8 |
.br |
.br |
9 |
.B pcre *pcre_compile(const char *\fIpattern\fR, int \fIoptions\fR, |
.B pcre *pcre_compile(const char *\fIpattern\fR, int \fIoptions\fR, |
10 |
.ti +5n |
.ti +5n |
11 |
.B char **\fIerrptr\fR, int *\fIerroffset\fR); |
.B const char **\fIerrptr\fR, int *\fIerroffset\fR); |
12 |
.PP |
.PP |
13 |
.br |
.br |
14 |
.B pcre_extra *pcre_study(const pcre *\fIcode\fR, int \fIoptions\fR, |
.B pcre_extra *pcre_study(const pcre *\fIcode\fR, int \fIoptions\fR, |
15 |
.ti +5n |
.ti +5n |
16 |
.B char **\fIerrptr\fR); |
.B const char **\fIerrptr\fR); |
17 |
.PP |
.PP |
18 |
.br |
.br |
19 |
.B int pcre_exec(const pcre *\fIcode\fR, "const pcre_extra *\fIextra\fR," |
.B int pcre_exec(const pcre *\fIcode\fR, "const pcre_extra *\fIextra\fR," |
603 |
|
|
604 |
.*/foo |
.*/foo |
605 |
|
|
606 |
is matched against the string "/foo/this/is/not" then after the initial greedy |
is matched against the string "/this/string/is/not" then after the greedy .* |
607 |
.* has swallowed the whole string, it keeps backtracking right the way to the |
has swallowed the whole string, PCRE keeps backtracking all the way to the |
608 |
beginning before failing. If, on the other hand, the expression is |
beginning before failing. If, on the other hand, the expression is |
609 |
|
|
610 |
.*/\\Xfoo |
.*/\\Xfoo |
866 |
which matches one digit by preference, but can match two if that is the only |
which matches one digit by preference, but can match two if that is the only |
867 |
way the rest of the pattern matches. |
way the rest of the pattern matches. |
868 |
|
|
869 |
When a parenthesized subpattern is quantified a with minimum repeat count that |
When a parenthesized subpattern is quantified with a minimum repeat count that |
870 |
is greater than 1 or with a limited maximum, more store is required for the |
is greater than 1 or with a limited maximum, more store is required for the |
871 |
compiled pattern, in proportion to the size of the minimum or maximum. |
compiled pattern, in proportion to the size of the minimum or maximum. |
872 |
|
|
924 |
normally causes the repeated item to be re-evaluated to see if a different |
normally causes the repeated item to be re-evaluated to see if a different |
925 |
number of repeats allows the rest of the pattern to match. Sometimes it is |
number of repeats allows the rest of the pattern to match. Sometimes it is |
926 |
useful to prevent this, either to change the nature of the match, or to cause |
useful to prevent this, either to change the nature of the match, or to cause |
927 |
it fail earlier than it otherwise might when the author or the pattern knows |
it fail earlier than it otherwise might when the author of the pattern knows |
928 |
there is no point in carrying on. |
there is no point in carrying on. |
929 |
|
|
930 |
Consider, for example, the pattern \\d+foo when applied to the subject line |
Consider, for example, the pattern \\d+foo when applied to the subject line |
1014 |
.br |
.br |
1015 |
Phone: +44 1223 334714 |
Phone: +44 1223 334714 |
1016 |
|
|
1017 |
Copyright (c) 1997 University of Cambridge. |
Copyright (c) 1998 University of Cambridge. |