2001-07-02 21:39:34 +02:00
|
|
|
COMMENT(!MOD!zsh/pcre
|
|
|
|
Interface to the PCRE library.
|
|
|
|
!MOD!)
|
|
|
|
cindex(regular expressions, perl-compatible)
|
|
|
|
The tt(zsh/pcre) module makes some commands available as builtins:
|
|
|
|
|
|
|
|
startitem()
|
|
|
|
findex(pcre_compile)
|
|
|
|
item(tt(pcre_compile) [ tt(-aimx) ] var(PCRE))(
|
|
|
|
Compiles a perl-compatible regular expression.
|
|
|
|
)
|
|
|
|
findex(pcre_study)
|
|
|
|
item(tt(pcre_study))(
|
|
|
|
Studies the previously-compiled PCRE which may result in faster
|
|
|
|
matching.
|
|
|
|
)
|
|
|
|
findex(pcre_match)
|
2001-07-04 17:13:33 +02:00
|
|
|
item(tt(pcre_match) [ tt(-a) var(arr) ] var(string))(
|
2001-07-02 21:39:34 +02:00
|
|
|
Returns successfully if tt(string) matches the previously-compiled
|
|
|
|
PCRE.
|
2001-07-03 18:52:35 +02:00
|
|
|
|
|
|
|
If the expression captures substrings within parentheses,
|
2001-07-04 17:13:33 +02:00
|
|
|
tt(pcre_match) will set the array var($match) to those
|
|
|
|
substrings, unless the tt(-a) option is given, in which
|
|
|
|
case it will set the array var(arr).
|
2001-07-02 21:39:34 +02:00
|
|
|
)
|
|
|
|
enditem()
|