ICU 56.1  56.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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;
41 
42 
47 typedef enum URegexpFlag{
48 
49 #ifndef U_HIDE_DRAFT_API
50 
54 #endif /* U_HIDE_DRAFT_API */
55 
57 
60 
64 
76 
82 
89 
97  UREGEX_UWORD = 256,
98 
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
210 
211 #if U_SHOW_CPLUSPLUS_API
212 
214 
225 
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
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
323  const UChar *text,
324  int32_t textLength,
325  UErrorCode *status);
326 
327 
344 U_STABLE void U_EXPORT2
346  UText *text,
347  UErrorCode *status);
348 
369 U_STABLE const UChar * U_EXPORT2
371  int32_t *textLength,
372  UErrorCode *status);
373 
390 U_STABLE UText * U_EXPORT2
392  UText *dest,
393  UErrorCode *status);
394 
420 U_STABLE void U_EXPORT2
422  UText *text,
423  UErrorCode *status);
424 
445 U_STABLE UBool U_EXPORT2
447  int32_t startIndex,
448  UErrorCode *status);
449 
471 U_STABLE UBool U_EXPORT2
473  int64_t startIndex,
474  UErrorCode *status);
475 
499 U_STABLE UBool U_EXPORT2
501  int32_t startIndex,
502  UErrorCode *status);
503 
528 U_STABLE UBool U_EXPORT2
530  int64_t startIndex,
531  UErrorCode *status);
532 
552 U_STABLE UBool U_EXPORT2
554  int32_t startIndex,
555  UErrorCode *status);
556 
577 U_STABLE UBool U_EXPORT2
579  int64_t startIndex,
580  UErrorCode *status);
581 
595 U_STABLE UBool U_EXPORT2
597  UErrorCode *status);
598 
606 U_STABLE int32_t U_EXPORT2
608  UErrorCode *status);
609 
610 #ifndef U_HIDE_DRAFT_API
611 
627 U_DRAFT int32_t U_EXPORT2
629  const UChar *groupName,
630  int32_t nameLength,
631  UErrorCode *status);
632 
633 
651 U_DRAFT int32_t U_EXPORT2
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
676  int32_t groupNum,
677  UChar *dest,
678  int32_t destCapacity,
679  UErrorCode *status);
680 
703 U_STABLE UText * U_EXPORT2
705  int32_t groupNum,
706  UText *dest,
707  int64_t *groupLength,
708  UErrorCode *status);
709 
724 U_STABLE int32_t U_EXPORT2
726  int32_t groupNum,
727  UErrorCode *status);
728 
744 U_STABLE int64_t U_EXPORT2
746  int32_t groupNum,
747  UErrorCode *status);
748 
762 U_STABLE int32_t U_EXPORT2
764  int32_t groupNum,
765  UErrorCode *status);
766 
781 U_STABLE int64_t U_EXPORT2
783  int32_t groupNum,
784  UErrorCode *status);
785 
799 U_STABLE void U_EXPORT2
801  int32_t index,
802  UErrorCode *status);
803 
818 U_STABLE void U_EXPORT2
820  int64_t index,
821  UErrorCode *status);
822 
843 U_STABLE void U_EXPORT2
845  int32_t regionStart,
846  int32_t regionLimit,
847  UErrorCode *status);
848 
870 U_STABLE void U_EXPORT2
872  int64_t regionStart,
873  int64_t regionLimit,
874  UErrorCode *status);
875 
890 U_STABLE void U_EXPORT2
892  int64_t regionStart,
893  int64_t regionLimit,
894  int64_t startIndex,
895  UErrorCode *status);
896 
906 U_STABLE int32_t U_EXPORT2
908  UErrorCode *status);
909 
920 U_STABLE int64_t U_EXPORT2
922  UErrorCode *status);
923 
934 U_STABLE int32_t U_EXPORT2
936  UErrorCode *status);
937 
949 U_STABLE int64_t U_EXPORT2
951  UErrorCode *status);
952 
963 U_STABLE UBool U_EXPORT2
965  UErrorCode *status);
966 
967 
987 U_STABLE void U_EXPORT2
989  UBool b,
990  UErrorCode *status);
991 
992 
1002 U_STABLE UBool U_EXPORT2
1004  UErrorCode *status);
1005 
1006 
1020 U_STABLE void U_EXPORT2
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
1052  UErrorCode *status);
1053 
1054 
1055 
1056 
1057 
1082 U_STABLE int32_t U_EXPORT2
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
1113  UText *replacement,
1114  UText *dest,
1115  UErrorCode *status);
1116 
1141 U_STABLE int32_t U_EXPORT2
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
1172  UText *replacement,
1173  UText *dest,
1174  UErrorCode *status);
1175 
1222 U_STABLE int32_t U_EXPORT2
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
1254  UText *replacementText,
1255  UText *dest,
1256  UErrorCode *status);
1257 
1282 U_STABLE int32_t U_EXPORT2
1284  UChar **destBuf,
1285  int32_t *destCapacity,
1286  UErrorCode *status);
1287 
1306 U_STABLE UText * U_EXPORT2
1308  UText *dest,
1309  UErrorCode *status);
1310 
1362 U_STABLE int32_t U_EXPORT2
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
1399  UText *destFields[],
1400  int32_t destFieldsCapacity,
1401  UErrorCode *status);
1402 
1425 U_STABLE void U_EXPORT2
1427  int32_t limit,
1428  UErrorCode *status);
1429 
1439 U_STABLE int32_t U_EXPORT2
1441  UErrorCode *status);
1442 
1463 U_STABLE void U_EXPORT2
1465  int32_t limit,
1466  UErrorCode *status);
1467 
1475 U_STABLE int32_t U_EXPORT2
1477  UErrorCode *status);
1478 
1479 
1500  const void *context,
1501  int32_t steps);
1503 
1518 U_STABLE void U_EXPORT2
1520  URegexMatchCallback *callback,
1521  const void *context,
1522  UErrorCode *status);
1523 
1524 
1536 U_STABLE void U_EXPORT2
1538  URegexMatchCallback **callback,
1539  const void **context,
1540  UErrorCode *status);
1541 
1574  const void *context,
1575  int64_t matchIndex);
1577 
1578 
1590 U_STABLE void U_EXPORT2
1592  URegexFindProgressCallback *callback,
1593  const void *context,
1594  UErrorCode *status);
1595 
1607 U_STABLE void U_EXPORT2
1609  URegexFindProgressCallback **callback,
1610  const void **context,
1611  UErrorCode *status);
1612 
1613 #endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */
1614 #endif /* UREGEX_H */