<regex.h>
< regex.h > include 文件定义了以下正则表达式函数:
regcomp() |
regerror() |
regexec() |
regfree() |
The <regex.h> include file also declares the 正则表达式 (t) type, the 正则表达式 (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_ebrac
ereg_badbr
reg_erange
reg_espace
reg_badrpt
reg_echar
reg_ebol
reg_eeol
reg_ecomp
reg_eexec
reg_last
reg_badpat
reg_ecollate
reg_ectype
reg_eescape
reg_esubreg
reg_ebrack
reg_eparen
reg_ebrac
ereg_badbr
reg_erange
reg_espace
reg_badrpt
reg_echar
reg_ebol
reg_eeol
reg_ecomp
reg_eexec
reg_last
当在编译命令上指定 LOCALETYPE (*CLD) 时,这些声明和定义不可用。
注: regcomp () 和 regexec () 支持的正则表达式遵循此处描述的规范: "http://www.opengroup.org/onlinepubs/007908799/xbd/re.html"。