ICU 56.1: uregex.h Source File

ICU 56.1 56.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

uregex.h
Go to the documentation of this file.
1 /*
2 **********************************************************************
3 * Copyright (C) 2004-2015, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
6 * file name: uregex.h
7 * encoding: US-ASCII
8 * indentation:4
9 *
10 * created on: 2004mar09
11 * created by: Andy Heninger
12 *
13 * ICU Regular Expressions, API for C
14 */
15
23 #ifndef UREGEX_H
24 #define UREGEX_H
25
26 #include "unicode/utext.h"
27 #include "unicode/utypes.h"
28
29 #if !UCONFIG_NO_REGULAR_EXPRESSIONS
30
31 #include "unicode/localpointer.h"
32 #include "unicode/parseerr.h"
33
34 struct URegularExpression;
40 typedef struct URegularExpression URegularExpression;
41
42
47 typedef enum URegexpFlag{
48
49 #ifndef U_HIDE_DRAFT_API
50
53 UREGEX_CANON_EQ = 128,
54 #endif /* U_HIDE_DRAFT_API */
55
56 UREGEX_CASE_INSENSITIVE = 2,
57
59 UREGEX_COMMENTS = 4,
60
63 UREGEX_DOTALL = 32,
64
75 UREGEX_LITERAL = 16,
76
81 UREGEX_MULTILINE = 8,
82
88 UREGEX_UNIX_LINES = 1,
89
97 UREGEX_UWORD = 256,
98
106 UREGEX_ERROR_ON_UNKNOWN_ESCAPES = 512
107
108 } URegexpFlag;
109
132 U_STABLE URegularExpression * U_EXPORT2
133 uregex_open( const UChar *pattern,
134 int32_t patternLength,
135 uint32_t flags,
136 UParseError *pe,
137 UErrorCode *status);
138
162 U_STABLE URegularExpression * U_EXPORT2
163 uregex_openUText(UText *pattern,
164 uint32_t flags,
165 UParseError *pe,
166 UErrorCode *status);
167
191 #if !UCONFIG_NO_CONVERSION
192 U_STABLE URegularExpression * U_EXPORT2
193 uregex_openC( const char *pattern,
194 uint32_t flags,
195 UParseError *pe,
196 UErrorCode *status);
197 #endif
198
199
200
208 U_STABLE void U_EXPORT2
209 uregex_close(URegularExpression *regexp);
210
211 #if U_SHOW_CPLUSPLUS_API
212
213 U_NAMESPACE_BEGIN
214
224 U_DEFINE_LOCAL_OPEN_POINTER(LocalURegularExpressionPointer, URegularExpression, uregex_close);
225
226 U_NAMESPACE_END
227
228 #endif
229
248 U_STABLE URegularExpression * U_EXPORT2
249 uregex_clone(const URegularExpression *regexp, UErrorCode *status);
250
268 U_STABLE const UChar * U_EXPORT2
269 uregex_pattern(const URegularExpression *regexp,
270 int32_t *patLength,
271 UErrorCode *status);
272
284 U_STABLE UText * U_EXPORT2
285 uregex_patternUText(const URegularExpression *regexp,
286 UErrorCode *status);
287
296 U_STABLE int32_t U_EXPORT2
297 uregex_flags(const URegularExpression *regexp,
298 UErrorCode *status);
299
300
321 U_STABLE void U_EXPORT2
322 uregex_setText(URegularExpression *regexp,
323 const UChar *text,
324 int32_t textLength,
325 UErrorCode *status);
326
327
344 U_STABLE void U_EXPORT2
345 uregex_setUText(URegularExpression *regexp,
346 UText *text,
347 UErrorCode *status);
348
369 U_STABLE const UChar * U_EXPORT2
370 uregex_getText(URegularExpression *regexp,
371 int32_t *textLength,
372 UErrorCode *status);
373
390 U_STABLE UText * U_EXPORT2
391 uregex_getUText(URegularExpression *regexp,
392 UText *dest,
393 UErrorCode *status);
394
420 U_STABLE void U_EXPORT2
421 uregex_refreshUText(URegularExpression *regexp,
422 UText *text,
423 UErrorCode *status);
424
445 U_STABLE UBool U_EXPORT2
446 uregex_matches(URegularExpression *regexp,
447 int32_t startIndex,
448 UErrorCode *status);
449
471 U_STABLE UBool U_EXPORT2
472 uregex_matches64(URegularExpression *regexp,
473 int64_t startIndex,
474 UErrorCode *status);
475
499 U_STABLE UBool U_EXPORT2
500 uregex_lookingAt(URegularExpression *regexp,
501 int32_t startIndex,
502 UErrorCode *status);
503
528 U_STABLE UBool U_EXPORT2
529 uregex_lookingAt64(URegularExpression *regexp,
530 int64_t startIndex,
531 UErrorCode *status);
532
552 U_STABLE UBool U_EXPORT2
553 uregex_find(URegularExpression *regexp,
554 int32_t startIndex,
555 UErrorCode *status);
556
577 U_STABLE UBool U_EXPORT2
578 uregex_find64(URegularExpression *regexp,
579 int64_t startIndex,
580 UErrorCode *status);
581
595 U_STABLE UBool U_EXPORT2
596 uregex_findNext(URegularExpression *regexp,
597 UErrorCode *status);
598
606 U_STABLE int32_t U_EXPORT2
607 uregex_groupCount(URegularExpression *regexp,
608 UErrorCode *status);
609
610 #ifndef U_HIDE_DRAFT_API
611
627 U_DRAFT int32_t U_EXPORT2
628 uregex_groupNumberFromName(URegularExpression *regexp,
629 const UChar *groupName,
630 int32_t nameLength,
631 UErrorCode *status);
632
633
651 U_DRAFT int32_t U_EXPORT2
652 uregex_groupNumberFromCName(URegularExpression *regexp,
653 const char *groupName,
654 int32_t nameLength,
655 UErrorCode *status);
656 #endif /* U_HIDE_DRAFT_API */
657
674 U_STABLE int32_t U_EXPORT2
675 uregex_group(URegularExpression *regexp,
676 int32_t groupNum,
677 UChar *dest,
678 int32_t destCapacity,
679 UErrorCode *status);
680
703 U_STABLE UText * U_EXPORT2
704 uregex_groupUText(URegularExpression *regexp,
705 int32_t groupNum,
706 UText *dest,
707 int64_t *groupLength,
708 UErrorCode *status);
709
724 U_STABLE int32_t U_EXPORT2
725 uregex_start(URegularExpression *regexp,
726 int32_t groupNum,
727 UErrorCode *status);
728
744 U_STABLE int64_t U_EXPORT2
745 uregex_start64(URegularExpression *regexp,
746 int32_t groupNum,
747 UErrorCode *status);
748
762 U_STABLE int32_t U_EXPORT2
763 uregex_end(URegularExpression *regexp,
764 int32_t groupNum,
765 UErrorCode *status);
766
781 U_STABLE int64_t U_EXPORT2
782 uregex_end64(URegularExpression *regexp,
783 int32_t groupNum,
784 UErrorCode *status);
785
799 U_STABLE void U_EXPORT2
800 uregex_reset(URegularExpression *regexp,
801 int32_t index,
802 UErrorCode *status);
803
818 U_STABLE void U_EXPORT2
819 uregex_reset64(URegularExpression *regexp,
820 int64_t index,
821 UErrorCode *status);
822
843 U_STABLE void U_EXPORT2
844 uregex_setRegion(URegularExpression *regexp,
845 int32_t regionStart,
846 int32_t regionLimit,
847 UErrorCode *status);
848
870 U_STABLE void U_EXPORT2
871 uregex_setRegion64(URegularExpression *regexp,
872 int64_t regionStart,
873 int64_t regionLimit,
874 UErrorCode *status);
875
890 U_STABLE void U_EXPORT2
891 uregex_setRegionAndStart(URegularExpression *regexp,
892 int64_t regionStart,
893 int64_t regionLimit,
894 int64_t startIndex,
895 UErrorCode *status);
896
906 U_STABLE int32_t U_EXPORT2
907 uregex_regionStart(const URegularExpression *regexp,
908 UErrorCode *status);
909
920 U_STABLE int64_t U_EXPORT2
921 uregex_regionStart64(const URegularExpression *regexp,
922 UErrorCode *status);
923
934 U_STABLE int32_t U_EXPORT2
935 uregex_regionEnd(const URegularExpression *regexp,
936 UErrorCode *status);
937
949 U_STABLE int64_t U_EXPORT2
950 uregex_regionEnd64(const URegularExpression *regexp,
951 UErrorCode *status);
952
963 U_STABLE UBool U_EXPORT2
964 uregex_hasTransparentBounds(const URegularExpression *regexp,
965 UErrorCode *status);
966
967
987 U_STABLE void U_EXPORT2
988 uregex_useTransparentBounds(URegularExpression *regexp,
989 UBool b,
990 UErrorCode *status);
991
992
1002 U_STABLE UBool U_EXPORT2
1003 uregex_hasAnchoringBounds(const URegularExpression *regexp,
1004 UErrorCode *status);
1005
1006
1020 U_STABLE void U_EXPORT2
1021 uregex_useAnchoringBounds(URegularExpression *regexp,
1022 UBool b,
1023 UErrorCode *status);
1024
1035 U_STABLE UBool U_EXPORT2
1036 uregex_hitEnd(const URegularExpression *regexp,
1037 UErrorCode *status);
1038
1050 U_STABLE UBool U_EXPORT2
1051 uregex_requireEnd(const URegularExpression *regexp,
1052 UErrorCode *status);
1053
1054
1055
1056
1057
1082 U_STABLE int32_t U_EXPORT2
1083 uregex_replaceAll(URegularExpression *regexp,
1084 const UChar *replacementText,
1085 int32_t replacementLength,
1086 UChar *destBuf,
1087 int32_t destCapacity,
1088 UErrorCode *status);
1089
1111 U_STABLE UText * U_EXPORT2
1112 uregex_replaceAllUText(URegularExpression *regexp,
1113 UText *replacement,
1114 UText *dest,
1115 UErrorCode *status);
1116
1141 U_STABLE int32_t U_EXPORT2
1142 uregex_replaceFirst(URegularExpression *regexp,
1143 const UChar *replacementText,
1144 int32_t replacementLength,
1145 UChar *destBuf,
1146 int32_t destCapacity,
1147 UErrorCode *status);
1148
1170 U_STABLE UText * U_EXPORT2
1171 uregex_replaceFirstUText(URegularExpression *regexp,
1172 UText *replacement,
1173 UText *dest,
1174 UErrorCode *status);
1175
1222 U_STABLE int32_t U_EXPORT2
1223 uregex_appendReplacement(URegularExpression *regexp,
1224 const UChar *replacementText,
1225 int32_t replacementLength,
1226 UChar **destBuf,
1227 int32_t *destCapacity,
1228 UErrorCode *status);
1229
1252 U_STABLE void U_EXPORT2
1253 uregex_appendReplacementUText(URegularExpression *regexp,
1254 UText *replacementText,
1255 UText *dest,
1256 UErrorCode *status);
1257
1282 U_STABLE int32_t U_EXPORT2
1283 uregex_appendTail(URegularExpression *regexp,
1284 UChar **destBuf,
1285 int32_t *destCapacity,
1286 UErrorCode *status);
1287
1306 U_STABLE UText * U_EXPORT2
1307 uregex_appendTailUText(URegularExpression *regexp,
1308 UText *dest,
1309 UErrorCode *status);
1310
1362 U_STABLE int32_t U_EXPORT2
1363 uregex_split( URegularExpression *regexp,
1364 UChar *destBuf,
1365 int32_t destCapacity,
1366 int32_t *requiredCapacity,
1367 UChar *destFields[],
1368 int32_t destFieldsCapacity,
1369 UErrorCode *status);
1370
1397 U_STABLE int32_t U_EXPORT2
1398 uregex_splitUText(URegularExpression *regexp,
1399 UText *destFields[],
1400 int32_t destFieldsCapacity,
1401 UErrorCode *status);
1402
1425 U_STABLE void U_EXPORT2
1426 uregex_setTimeLimit(URegularExpression *regexp,
1427 int32_t limit,
1428 UErrorCode *status);
1429
1439 U_STABLE int32_t U_EXPORT2
1440 uregex_getTimeLimit(const URegularExpression *regexp,
1441 UErrorCode *status);
1442
1463 U_STABLE void U_EXPORT2
1464 uregex_setStackLimit(URegularExpression *regexp,
1465 int32_t limit,
1466 UErrorCode *status);
1467
1475 U_STABLE int32_t U_EXPORT2
1476 uregex_getStackLimit(const URegularExpression *regexp,
1477 UErrorCode *status);
1478
1479
1498 U_CDECL_BEGIN
1499 typedef UBool U_CALLCONV URegexMatchCallback (
1500 const void *context,
1501 int32_t steps);
1502 U_CDECL_END
1503
1518 U_STABLE void U_EXPORT2
1519 uregex_setMatchCallback(URegularExpression *regexp,
1520 URegexMatchCallback *callback,
1521 const void *context,
1522 UErrorCode *status);
1523
1524
1536 U_STABLE void U_EXPORT2
1537 uregex_getMatchCallback(const URegularExpression *regexp,
1538 URegexMatchCallback **callback,
1539 const void **context,
1540 UErrorCode *status);
1541
1572 U_CDECL_BEGIN
1573 typedef UBool U_CALLCONV URegexFindProgressCallback (
1574 const void *context,
1575 int64_t matchIndex);
1576 U_CDECL_END
1577
1578
1590 U_STABLE void U_EXPORT2
1591 uregex_setFindProgressCallback(URegularExpression *regexp,
1592 URegexFindProgressCallback *callback,
1593 const void *context,
1594 UErrorCode *status);
1595
1607 U_STABLE void U_EXPORT2
1608 uregex_getFindProgressCallback(const URegularExpression *regexp,
1609 URegexFindProgressCallback **callback,
1610 const void **context,
1611 UErrorCode *status);
1612
1613 #endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */
1614 #endif /* UREGEX_H */
uregex_getUText
UText * uregex_getUText(URegularExpression *regexp, UText *dest, UErrorCode *status)
Get the subject text that is currently associated with this regular expression object.
uregex_regionEnd64
int64_t uregex_regionEnd64(const URegularExpression *regexp, UErrorCode *status)
64bit version of uregex_regionEnd.
uregex_setText
void uregex_setText(URegularExpression *regexp, const UChar *text, int32_t textLength, UErrorCode *status)
Set the subject text string upon which the regular expression will look for matches.
uregex_lookingAt64
UBool uregex_lookingAt64(URegularExpression *regexp, int64_t startIndex, UErrorCode *status)
64bit version of uregex_lookingAt.
uregex_groupNumberFromCName
int32_t uregex_groupNumberFromCName(URegularExpression *regexp, const char *groupName, int32_t nameLength, UErrorCode *status)
Get the group number corresponding to a named capture group.
uregex_openC
URegularExpression * uregex_openC(const char *pattern, uint32_t flags, UParseError *pe, UErrorCode *status)
Open (compile) an ICU regular expression.
UREGEX_CANON_EQ
Forces normalization of pattern and strings.
Definition: uregex.h:53
uregex_getTimeLimit
int32_t uregex_getTimeLimit(const URegularExpression *regexp, UErrorCode *status)
Get the time limit for for matches with this URegularExpression.
LocalURegularExpressionPointer
"Smart pointer" class, closes a URegularExpression via uregex_close().
uregex_groupCount
int32_t uregex_groupCount(URegularExpression *regexp, UErrorCode *status)
Get the number of capturing groups in this regular expression's pattern.
uregex_splitUText
int32_t uregex_splitUText(URegularExpression *regexp, UText *destFields[], int32_t destFieldsCapacity, UErrorCode *status)
Split a string into fields.
uregex_setUText
void uregex_setUText(URegularExpression *regexp, UText *text, UErrorCode *status)
Set the subject text string upon which the regular expression will look for matches.
UREGEX_MULTILINE
Control behavior of "$" and "^" If set, recognize line terminators within string, otherwise...
Definition: uregex.h:81
uregex_reset
void uregex_reset(URegularExpression *regexp, int32_t index, UErrorCode *status)
Reset any saved state from the previous match.
uregex_find
UBool uregex_find(URegularExpression *regexp, int32_t startIndex, UErrorCode *status)
Find the first matching substring of the input string that matches the pattern.
uregex_getMatchCallback
void uregex_getMatchCallback(const URegularExpression *regexp, URegexMatchCallback **callback, const void **context, UErrorCode *status)
Get the callback function for this URegularExpression.
uregex_appendTail
int32_t uregex_appendTail(URegularExpression *regexp, UChar **destBuf, int32_t *destCapacity, UErrorCode *status)
As the final step in a find-and-replace operation, append the remainder of the input string...
uregex_regionEnd
int32_t uregex_regionEnd(const URegularExpression *regexp, UErrorCode *status)
Reports the end index (exclusive) of the matching region for this URegularExpression.
UREGEX_DOTALL
If set, '.
Definition: uregex.h:63
UREGEX_UNIX_LINES
Unix-only line endings.
Definition: uregex.h:88
uregex_requireEnd
UBool uregex_requireEnd(const URegularExpression *regexp, UErrorCode *status)
Return TRUE the most recent match succeeded and additional input could cause it to fail...
U_CALLCONV
#define U_CALLCONV
Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to ma...
Definition: platform.h:823
uregex_replaceAll
int32_t uregex_replaceAll(URegularExpression *regexp, const UChar *replacementText, int32_t replacementLength, UChar *destBuf, int32_t destCapacity, UErrorCode *status)
Replaces every substring of the input that matches the pattern with the given replacement string...
uregex_setRegion
void uregex_setRegion(URegularExpression *regexp, int32_t regionStart, int32_t regionLimit, UErrorCode *status)
Sets the limits of the matching region for this URegularExpression.
uregex_split
int32_t uregex_split(URegularExpression *regexp, UChar *destBuf, int32_t destCapacity, int32_t *requiredCapacity, UChar *destFields[], int32_t destFieldsCapacity, UErrorCode *status)
Split a string into fields.
uregex_end
int32_t uregex_end(URegularExpression *regexp, int32_t groupNum, UErrorCode *status)
Returns the index in the input string of the position following the end of the text matched by the sp...
uregex_matches64
UBool uregex_matches64(URegularExpression *regexp, int64_t startIndex, UErrorCode *status)
64bit version of uregex_matches.
URegexFindProgressCallback
UBool URegexFindProgressCallback(const void *context, int64_t matchIndex)
Function pointer for a regular expression find callback function.
Definition: uregex.h:1573
uregex_matches
UBool uregex_matches(URegularExpression *regexp, int32_t startIndex, UErrorCode *status)
Attempts to match the input string against the pattern.
uregex_open
URegularExpression * uregex_open(const UChar *pattern, int32_t patternLength, uint32_t flags, UParseError *pe, UErrorCode *status)
Open (compile) an ICU regular expression.
uregex_close
void uregex_close(URegularExpression *regexp)
Close the regular expression, recovering all resources (memory) it was holding.
uregex_groupNumberFromName
int32_t uregex_groupNumberFromName(URegularExpression *regexp, const UChar *groupName, int32_t nameLength, UErrorCode *status)
Get the group number corresponding to a named capture group.
utext.h
C API: Abstract Unicode Text API.
uregex_start64
int64_t uregex_start64(URegularExpression *regexp, int32_t groupNum, UErrorCode *status)
64bit version of uregex_start.
uregex_findNext
UBool uregex_findNext(URegularExpression *regexp, UErrorCode *status)
Find the next pattern match in the input string.
uregex_setFindProgressCallback
void uregex_setFindProgressCallback(URegularExpression *regexp, URegexFindProgressCallback *callback, const void *context, UErrorCode *status)
Set the find progress callback function for this URegularExpression.
U_CDECL_BEGIN
#define U_CDECL_BEGIN
This is used to begin a declaration of a library private ICU C API.
Definition: umachine.h:82
uregex_getStackLimit
int32_t uregex_getStackLimit(const URegularExpression *regexp, UErrorCode *status)
Get the size of the heap storage available for use by the back tracking stack.
uregex_clone
URegularExpression * uregex_clone(const URegularExpression *regexp, UErrorCode *status)
Make a copy of a compiled regular expression.
URegexpFlag
URegexpFlag
Constants for Regular Expression Match Modes.
Definition: uregex.h:47
uregex_setStackLimit
void uregex_setStackLimit(URegularExpression *regexp, int32_t limit, UErrorCode *status)
Set the amount of heap storage available for use by the match backtracking stack. ...
UREGEX_COMMENTS
Allow white space and comments within patterns.
Definition: uregex.h:59
uregex_useAnchoringBounds
void uregex_useAnchoringBounds(URegularExpression *regexp, UBool b, UErrorCode *status)
Set whether this URegularExpression is using Anchoring Bounds for its region.
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
uregex_appendReplacement
int32_t uregex_appendReplacement(URegularExpression *regexp, const UChar *replacementText, int32_t replacementLength, UChar **destBuf, int32_t *destCapacity, UErrorCode *status)
Implements a replace operation intended to be used as part of an incremental find-and-replace.
uregex_appendReplacementUText
void uregex_appendReplacementUText(URegularExpression *regexp, UText *replacementText, UText *dest, UErrorCode *status)
Implements a replace operation intended to be used as part of an incremental find-and-replace.
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:535
uregex_hasTransparentBounds
UBool uregex_hasTransparentBounds(const URegularExpression *regexp, UErrorCode *status)
Queries the transparency of region bounds for this URegularExpression.
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
uregex_pattern
const UChar * uregex_pattern(const URegularExpression *regexp, int32_t *patLength, UErrorCode *status)
Returns a pointer to the source form of the pattern for this regular expression.
uregex_find64
UBool uregex_find64(URegularExpression *regexp, int64_t startIndex, UErrorCode *status)
64bit version of uregex_find.
uregex_setRegionAndStart
void uregex_setRegionAndStart(URegularExpression *regexp, int64_t regionStart, int64_t regionLimit, int64_t startIndex, UErrorCode *status)
Set the matching region and the starting index for subsequent matches in a single operation...
uregex_reset64
void uregex_reset64(URegularExpression *regexp, int64_t index, UErrorCode *status)
64bit version of uregex_reset.
uregex_setMatchCallback
void uregex_setMatchCallback(URegularExpression *regexp, URegexMatchCallback *callback, const void *context, UErrorCode *status)
Set a callback function for this URegularExpression.
uregex_flags
int32_t uregex_flags(const URegularExpression *regexp, UErrorCode *status)
Get the match mode flags that were specified when compiling this regular expression.
URegularExpression
struct URegularExpression URegularExpression
Structure representing a compiled regular expression, plus the results of a match operation...
Definition: uregex.h:40
uregex_getFindProgressCallback
void uregex_getFindProgressCallback(const URegularExpression *regexp, URegexFindProgressCallback **callback, const void **context, UErrorCode *status)
Get the find progress callback function for this URegularExpression.
uregex_replaceFirstUText
UText * uregex_replaceFirstUText(URegularExpression *regexp, UText *replacement, UText *dest, UErrorCode *status)
Replaces the first substring of the input that matches the pattern with the given replacement string...
UChar
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Definition: umachine.h:312
U_CDECL_END
#define U_CDECL_END
This is used to end a declaration of a library private ICU C API.
Definition: umachine.h:83
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
URegexMatchCallback
UBool URegexMatchCallback(const void *context, int32_t steps)
Function pointer for a regular expression matching callback function.
Definition: uregex.h:1499
uregex_hasAnchoringBounds
UBool uregex_hasAnchoringBounds(const URegularExpression *regexp, UErrorCode *status)
Return true if this URegularExpression is using anchoring bounds.
uregex_regionStart
int32_t uregex_regionStart(const URegularExpression *regexp, UErrorCode *status)
Reports the start index of the matching region.
parseerr.h
C API: Parse Error Information.
UREGEX_UWORD
Unicode word boundaries.
Definition: uregex.h:97
uregex_groupUText
UText * uregex_groupUText(URegularExpression *regexp, int32_t groupNum, UText *dest, int64_t *groupLength, UErrorCode *status)
Returns a shallow immutable clone of the entire input string with the current index set to the beginn...
uregex_appendTailUText
UText * uregex_appendTailUText(URegularExpression *regexp, UText *dest, UErrorCode *status)
As the final step in a find-and-replace operation, append the remainder of the input string...
uregex_group
int32_t uregex_group(URegularExpression *regexp, int32_t groupNum, UChar *dest, int32_t destCapacity, UErrorCode *status)
Extract the string for the specified matching expression or subexpression.
UREGEX_ERROR_ON_UNKNOWN_ESCAPES
Error on Unrecognized backslash escapes.
Definition: uregex.h:106
uregex_patternUText
UText * uregex_patternUText(const URegularExpression *regexp, UErrorCode *status)
Returns the source text of the pattern for this regular expression.
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
UREGEX_LITERAL
If set, treat the entire pattern as a literal string.
Definition: uregex.h:75
uregex_useTransparentBounds
void uregex_useTransparentBounds(URegularExpression *regexp, UBool b, UErrorCode *status)
Sets the transparency of region bounds for this URegularExpression.
UText
UText struct.
Definition: utext.h:1343
UParseError
A UParseError struct is used to returned detailed information about parsing errors.
Definition: parseerr.h:56
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
uregex_start
int32_t uregex_start(URegularExpression *regexp, int32_t groupNum, UErrorCode *status)
Returns the index in the input string of the start of the text matched by the specified capture group...
uregex_refreshUText
void uregex_refreshUText(URegularExpression *regexp, UText *text, UErrorCode *status)
Set the subject text string upon which the regular expression is looking for matches without changing...
uregex_regionStart64
int64_t uregex_regionStart64(const URegularExpression *regexp, UErrorCode *status)
64bit version of uregex_regionStart.
UREGEX_CASE_INSENSITIVE
Enable case insensitive matching.
Definition: uregex.h:56
uregex_getText
const UChar * uregex_getText(URegularExpression *regexp, int32_t *textLength, UErrorCode *status)
Get the subject text that is currently associated with this regular expression object.
uregex_openUText
URegularExpression * uregex_openUText(UText *pattern, uint32_t flags, UParseError *pe, UErrorCode *status)
Open (compile) an ICU regular expression.
uregex_hitEnd
UBool uregex_hitEnd(const URegularExpression *regexp, UErrorCode *status)
Return TRUE if the most recent matching operation touched the end of the text being processed...
uregex_setTimeLimit
void uregex_setTimeLimit(URegularExpression *regexp, int32_t limit, UErrorCode *status)
Set a processing time limit for match operations with this URegularExpression.
U_DRAFT
#define U_DRAFT
This is used to declare a function as a draft public ICU C API.
Definition: umachine.h:111
uregex_replaceAllUText
UText * uregex_replaceAllUText(URegularExpression *regexp, UText *replacement, UText *dest, UErrorCode *status)
Replaces every substring of the input that matches the pattern with the given replacement string...
uregex_replaceFirst
int32_t uregex_replaceFirst(URegularExpression *regexp, const UChar *replacementText, int32_t replacementLength, UChar *destBuf, int32_t destCapacity, UErrorCode *status)
Replaces the first substring of the input that matches the pattern with the given replacement string...
uregex_end64
int64_t uregex_end64(URegularExpression *regexp, int32_t groupNum, UErrorCode *status)
64bit version of uregex_end.
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109
uregex_setRegion64
void uregex_setRegion64(URegularExpression *regexp, int64_t regionStart, int64_t regionLimit, UErrorCode *status)
64bit version of uregex_setRegion.
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234
uregex_lookingAt
UBool uregex_lookingAt(URegularExpression *regexp, int32_t startIndex, UErrorCode *status)
Attempts to match the input string, starting from the specified index, against the pattern...