| 2135 |
failing negative assertion, they cause an error if encountered by |
failing negative assertion, they cause an error if encountered by |
| 2136 |
\fBpcre_dfa_exec()\fP. |
\fBpcre_dfa_exec()\fP. |
| 2137 |
.P |
.P |
| 2138 |
|
If any of these verbs are used in an assertion subpattern, their effect is |
| 2139 |
|
confined to that subpattern; it does not extend to the surrounding pattern. |
| 2140 |
|
Note that assertion subpatterns are processed as anchored at the point where |
| 2141 |
|
they are tested. |
| 2142 |
|
.P |
| 2143 |
The new verbs make use of what was previously invalid syntax: an opening |
The new verbs make use of what was previously invalid syntax: an opening |
| 2144 |
parenthesis followed by an asterisk. In Perl, they are generally of the form |
parenthesis followed by an asterisk. In Perl, they are generally of the form |
| 2145 |
(*VERB:ARG) but PCRE does not support the use of arguments, so its general |
(*VERB:ARG) but PCRE does not support the use of arguments, so its general |
| 2155 |
.sp |
.sp |
| 2156 |
This verb causes the match to end successfully, skipping the remainder of the |
This verb causes the match to end successfully, skipping the remainder of the |
| 2157 |
pattern. When inside a recursion, only the innermost pattern is ended |
pattern. When inside a recursion, only the innermost pattern is ended |
| 2158 |
immediately. PCRE differs from Perl in what happens if the (*ACCEPT) is inside |
immediately. If the (*ACCEPT) is inside capturing parentheses, the data so far |
| 2159 |
capturing parentheses. In Perl, the data so far is captured: in PCRE no data is |
is captured. (This feature was added to PCRE at release 8.00.) For example: |
|
captured. For example: |
|
| 2160 |
.sp |
.sp |
| 2161 |
A(A|B(*ACCEPT)|C)D |
A((?:A|B(*ACCEPT)|C)D) |
| 2162 |
.sp |
.sp |
| 2163 |
This matches "AB", "AAD", or "ACD", but when it matches "AB", no data is |
This matches "AB", "AAD", or "ACD"; when it matches "AB", "B" is captured by |
| 2164 |
captured. |
the outer parentheses. |
| 2165 |
.sp |
.sp |
| 2166 |
(*FAIL) or (*F) |
(*FAIL) or (*F) |
| 2167 |
.sp |
.sp |
| 2258 |
.rs |
.rs |
| 2259 |
.sp |
.sp |
| 2260 |
.nf |
.nf |
| 2261 |
Last updated: 11 April 2009 |
Last updated: 15 September 2009 |
| 2262 |
Copyright (c) 1997-2009 University of Cambridge. |
Copyright (c) 1997-2009 University of Cambridge. |
| 2263 |
.fi |
.fi |