<regex.h>
The <regex.h> include file defines the following regular expression functions:
regcomp() |
regerror() |
regexec() |
regfree() |
The <regex.h> include file also declares the regmatch_t type, the regex_t type, which is capable of storing a compiled regular expression, and the following macros:
regcomp() 函數的 cflags 參數值:
REG_BASIC
REG_EXTENDED
REG_ICASE
REG_NEWLINE
REG_NOSUB
REG_EXTENDED
REG_ICASE
REG_NEWLINE
REG_NOSUB
regexec() 函數的 eflags 參數值:
REG_NOTBOL
REG_NOTEOL
REG_NOTEOL
regerror() 函數的 errcode 參數值:
REG_NOMATCH
REG_BADPAT
REG_ECOLLATE
REG_ECTYPE
REG_EESCAPE
REG_ESUBREG
REG_EBRACK
REG_EPAREN
REG_EBRACE
REG_BADBR
REG_ERANGE
REG_ESPACE
REG_BADRPT
REG_ECHAR
REG_EBOL
REG_EEOL
REG_ECOMP
REG_EEXEC
REG_REG_LAST
REG_BADPAT
REG_ECOLLATE
REG_ECTYPE
REG_EESCAPE
REG_ESUBREG
REG_EBRACK
REG_EPAREN
REG_EBRACE
REG_BADBR
REG_ERANGE
REG_ESPACE
REG_BADRPT
REG_ECHAR
REG_EBOL
REG_EEOL
REG_ECOMP
REG_EEXEC
REG_REG_LAST
在編譯指令上指定 LOCALETYPE (*CLD) 時,無法使用這些宣告及定義。
附註: regcomp () 和 regexec () 支援的正規表示式遵循這裡說明的規格: "http://www.opengroup.org/onlinepubs/007908799/xbd/re.html"。