uregex.h

Go to the documentation of this file.
00001 /* 00002 ********************************************************************** 00003 * Copyright (C) 2004, International Business Machines 00004 * Corporation and others. All Rights Reserved. 00005 ********************************************************************** 00006 * file name: regex.h 00007 * encoding: US-ASCII 00008 * indentation:4 00009 * 00010 * created on: 2004mar09 00011 * created by: Andy Heninger 00012 * 00013 * ICU Regular Expressions, API for C 00014 */ 00015 00016 #ifndef UREGEX_H 00017 #define UREGEX_H 00018 00019 #include "unicode/utypes.h" 00020 00021 #if !UCONFIG_NO_REGULAR_EXPRESSIONS 00022 00023 #include "unicode/parseerr.h" 00024 00025 #ifndef U_HIDE_DRAFT_API 00026 00027 struct URegularExpression; 00033 typedef struct URegularExpression URegularExpression; 00034 00035 #endif /* U_HIDE_DRAFT_API */ 00036 00037 00042 typedef enum URegexpFlag{ 00044 UREGEX_CANON_EQ = 128, 00045 00047 UREGEX_CASE_INSENSITIVE = 2, 00048 00050 UREGEX_COMMENTS = 4, 00051 00054 UREGEX_DOTALL = 32, 00055 00060 UREGEX_MULTILINE = 8, 00061 00069 UREGEX_UWORD = 256 00070 } URegexpFlag; 00071 00093 U_DRAFT URegularExpression * U_EXPORT2 00094 uregex_open( const UChar *pattern, 00095 int32_t patternLength, 00096 uint32_t flags, 00097 UParseError *pe, 00098 UErrorCode *status); 00099 00123 U_DRAFT URegularExpression * U_EXPORT2 00124 uregex_openC( const char *pattern, 00125 uint32_t flags, 00126 UParseError *pe, 00127 UErrorCode *status); 00128 00129 00130 00131 00139 U_DRAFT void U_EXPORT2 00140 uregex_close(URegularExpression *regexp); 00141 00160 U_DRAFT URegularExpression * U_EXPORT2 00161 uregex_clone(const URegularExpression *regexp, UErrorCode *status); 00162 00179 U_DRAFT const UChar * U_EXPORT2 00180 uregex_pattern(const URegularExpression *regexp, 00181 int32_t *patLength, 00182 UErrorCode *status); 00183 00184 00193 U_DRAFT int32_t U_EXPORT2 00194 uregex_flags(const URegularExpression *regexp, 00195 UErrorCode *status); 00196 00197 00218 U_DRAFT void U_EXPORT2 00219 uregex_setText(URegularExpression *regexp, 00220 const UChar *text, 00221 int32_t textLength, 00222 UErrorCode *status); 00223 00240 U_DRAFT const UChar * U_EXPORT2 00241 uregex_getText(URegularExpression *regexp, 00242 int32_t *textLength, 00243 UErrorCode *status); 00244 00255 U_DRAFT UBool U_EXPORT2 00256 uregex_matches(URegularExpression *regexp, 00257 int32_t startIndex, 00258 UErrorCode *status); 00259 00275 U_DRAFT UBool U_EXPORT2 00276 uregex_lookingAt(URegularExpression *regexp, 00277 int32_t startIndex, 00278 UErrorCode *status); 00279 00292 U_DRAFT UBool U_EXPORT2 00293 uregex_find(URegularExpression *regexp, 00294 int32_t startIndex, 00295 UErrorCode *status); 00296 00310 U_DRAFT UBool U_EXPORT2 00311 uregex_findNext(URegularExpression *regexp, 00312 UErrorCode *status); 00313 00321 U_DRAFT int32_t U_EXPORT2 00322 uregex_groupCount(URegularExpression *regexp, 00323 UErrorCode *status); 00324 00341 U_DRAFT int32_t U_EXPORT2 00342 uregex_group(URegularExpression *regexp, 00343 int32_t groupNum, 00344 UChar *dest, 00345 int32_t destCapacity, 00346 UErrorCode *status); 00347 00348 00363 U_DRAFT int32_t U_EXPORT2 00364 uregex_start(URegularExpression *regexp, 00365 int32_t groupNum, 00366 UErrorCode *status); 00367 00381 U_DRAFT int32_t U_EXPORT2 00382 uregex_end(URegularExpression *regexp, 00383 int32_t groupNum, 00384 UErrorCode *status); 00385 00398 U_DRAFT void U_EXPORT2 00399 uregex_reset(URegularExpression *regexp, 00400 int32_t index, 00401 UErrorCode *status); 00402 00427 U_DRAFT int32_t U_EXPORT2 00428 uregex_replaceAll(URegularExpression *regexp, 00429 UChar *replacementText, 00430 int32_t replacementLength, 00431 UChar *destBuf, 00432 int32_t destCapacity, 00433 UErrorCode *status); 00434 00435 00460 U_DRAFT int32_t U_EXPORT2 00461 uregex_replaceFirst(URegularExpression *regexp, 00462 UChar *replacementText, 00463 int32_t replacementLength, 00464 UChar *destBuf, 00465 int32_t destCapacity, 00466 UErrorCode *status); 00467 00468 00515 U_DRAFT int32_t U_EXPORT2 00516 uregex_appendReplacement(URegularExpression *regexp, 00517 UChar *replacementText, 00518 int32_t replacementLength, 00519 UChar **destBuf, 00520 int32_t *destCapacity, 00521 UErrorCode *status); 00522 00523 00548 U_DRAFT int32_t U_EXPORT2 00549 uregex_appendTail(URegularExpression *regexp, 00550 UChar **destBuf, 00551 int32_t *destCapacity, 00552 UErrorCode *status); 00553 00554 00555 00556 00611 U_DRAFT int32_t U_EXPORT2 00612 uregex_split( URegularExpression *regexp, 00613 UChar *destBuf, 00614 int32_t destCapacity, 00615 int32_t *requiredCapacity, 00616 UChar *destFields[], 00617 int32_t destFieldsCapacity, 00618 UErrorCode *status); 00619 00620 00621 00622 #endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */ 00623 #endif /* UREGEX_H */

Generated on Fri Jun 18 12:36:02 2004 for ICU by doxygen 1.3.7