about summary refs log tree commit diff
path: root/Doc/Zsh/mod_pcre.yo
blob: 2d99890838fa6e5a832c7126830f28f4a8e099ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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)
item(tt(pcre_match) var(string))(
Returns successfully if tt(string) matches the previously-compiled
PCRE.

If the expression captures substrings within parentheses,
tt(pcre_match) will set the positional parameters to
those substrings, starting with $1 for the first.
)
enditem()