157 |
The following table shows additional modifiers for setting PCRE options that do |
The following table shows additional modifiers for setting PCRE options that do |
158 |
not correspond to anything in Perl: |
not correspond to anything in Perl: |
159 |
.sp |
.sp |
160 |
\fB/A\fP PCRE_ANCHORED |
\fB/A\fP PCRE_ANCHORED |
161 |
\fB/C\fP PCRE_AUTO_CALLOUT |
\fB/C\fP PCRE_AUTO_CALLOUT |
162 |
\fB/E\fP PCRE_DOLLAR_ENDONLY |
\fB/E\fP PCRE_DOLLAR_ENDONLY |
163 |
\fB/f\fP PCRE_FIRSTLINE |
\fB/f\fP PCRE_FIRSTLINE |
164 |
\fB/J\fP PCRE_DUPNAMES |
\fB/J\fP PCRE_DUPNAMES |
165 |
\fB/N\fP PCRE_NO_AUTO_CAPTURE |
\fB/N\fP PCRE_NO_AUTO_CAPTURE |
166 |
\fB/U\fP PCRE_UNGREEDY |
\fB/U\fP PCRE_UNGREEDY |
167 |
\fB/X\fP PCRE_EXTRA |
\fB/X\fP PCRE_EXTRA |
168 |
\fB/<cr>\fP PCRE_NEWLINE_CR |
\fB/<cr>\fP PCRE_NEWLINE_CR |
169 |
\fB/<lf>\fP PCRE_NEWLINE_LF |
\fB/<lf>\fP PCRE_NEWLINE_LF |
170 |
\fB/<crlf>\fP PCRE_NEWLINE_CRLF |
\fB/<crlf>\fP PCRE_NEWLINE_CRLF |
171 |
\fB/<any>\fP PCRE_NEWLINE_ANY |
\fB/<anycrlf>\fP PCRE_NEWLINE_ANYCRLF |
172 |
.sp |
\fB/<any>\fP PCRE_NEWLINE_ANY |
173 |
Those specifying line ending sequencess are literal strings as shown. This |
.sp |
174 |
example sets multiline matching with CRLF as the line ending sequence: |
Those specifying line ending sequences are literal strings as shown, but the |
175 |
|
letters can be in either case. This example sets multiline matching with CRLF |
176 |
|
as the line ending sequence: |
177 |
.sp |
.sp |
178 |
/^abc/m<crlf> |
/^abc/m<crlf> |
179 |
.sp |
.sp |
216 |
multiple copies of the same substring. |
multiple copies of the same substring. |
217 |
.P |
.P |
218 |
The \fB/B\fP modifier is a debugging feature. It requests that \fBpcretest\fP |
The \fB/B\fP modifier is a debugging feature. It requests that \fBpcretest\fP |
219 |
output a representation of the compiled byte code after compilation. |
output a representation of the compiled byte code after compilation. Normally |
220 |
|
this information contains length and offset values; however, if \fB/Z\fP is |
221 |
|
also present, this data is replaced by spaces. This is a special feature for |
222 |
|
use in the automatic test scripts; it ensures that the same output is generated |
223 |
|
for different internal link sizes. |
224 |
.P |
.P |
225 |
The \fB/L\fP modifier must be followed directly by the name of a locale, for |
The \fB/L\fP modifier must be followed directly by the name of a locale, for |
226 |
example, |
example, |
239 |
pattern. If the pattern is studied, the results of that are also output. |
pattern. If the pattern is studied, the results of that are also output. |
240 |
.P |
.P |
241 |
The \fB/D\fP modifier is a PCRE debugging feature, and is equivalent to |
The \fB/D\fP modifier is a PCRE debugging feature, and is equivalent to |
242 |
\fB/BI\fP, that is, both the \fP/B\fP and the \fB/I\fP modifiers. |
\fB/BI\fP, that is, both the \fB/B\fP and the \fB/I\fP modifiers. |
243 |
.P |
.P |
244 |
The \fB/F\fP modifier causes \fBpcretest\fP to flip the byte order of the |
The \fB/F\fP modifier causes \fBpcretest\fP to flip the byte order of the |
245 |
fields in the compiled pattern that contain 2-byte and 4-byte numbers. This |
fields in the compiled pattern that contain 2-byte and 4-byte numbers. This |
374 |
\e<crlf> pass the PCRE_NEWLINE_CRLF option to \fBpcre_exec()\fP |
\e<crlf> pass the PCRE_NEWLINE_CRLF option to \fBpcre_exec()\fP |
375 |
or \fBpcre_dfa_exec()\fP |
or \fBpcre_dfa_exec()\fP |
376 |
.\" JOIN |
.\" JOIN |
377 |
|
\e<anycrlf> pass the PCRE_NEWLINE_ANYCRLF option to \fBpcre_exec()\fP |
378 |
|
or \fBpcre_dfa_exec()\fP |
379 |
|
.\" JOIN |
380 |
\e<any> pass the PCRE_NEWLINE_ANY option to \fBpcre_exec()\fP |
\e<any> pass the PCRE_NEWLINE_ANY option to \fBpcre_exec()\fP |
381 |
or \fBpcre_dfa_exec()\fP |
or \fBpcre_dfa_exec()\fP |
382 |
.sp |
.sp |
412 |
The use of \ex{hh...} to represent UTF-8 characters is not dependent on the use |
The use of \ex{hh...} to represent UTF-8 characters is not dependent on the use |
413 |
of the \fB/8\fP modifier on the pattern. It is recognized always. There may be |
of the \fB/8\fP modifier on the pattern. It is recognized always. There may be |
414 |
any number of hexadecimal digits inside the braces. The result is from one to |
any number of hexadecimal digits inside the braces. The result is from one to |
415 |
six bytes, encoded according to the UTF-8 rules. |
six bytes, encoded according to the original UTF-8 rules of RFC 2279. This |
416 |
|
allows for values in the range 0 to 0x7FFFFFFF. Note that not all of those are |
417 |
|
valid Unicode code points, or indeed valid UTF-8 characters according to the |
418 |
|
later rules in RFC 3629. |
419 |
. |
. |
420 |
. |
. |
421 |
.SH "THE ALTERNATIVE MATCHING FUNCTION" |
.SH "THE ALTERNATIVE MATCHING FUNCTION" |
541 |
match with additional subject data by means of the \eR escape sequence. For |
match with additional subject data by means of the \eR escape sequence. For |
542 |
example: |
example: |
543 |
.sp |
.sp |
544 |
re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/ |
re> /^\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed$/ |
545 |
data> 23ja\eP\eD |
data> 23ja\eP\eD |
546 |
Partial match: 23ja |
Partial match: 23ja |
547 |
data> n05\eR\eD |
data> n05\eR\eD |
677 |
.rs |
.rs |
678 |
.sp |
.sp |
679 |
\fBpcre\fP(3), \fBpcreapi\fP(3), \fBpcrecallout\fP(3), \fBpcrematching\fP(3), |
\fBpcre\fP(3), \fBpcreapi\fP(3), \fBpcrecallout\fP(3), \fBpcrematching\fP(3), |
680 |
\fBpcrepartial\fP(d), \fPpcrepattern\fP(3), \fBpcreprecompile\fP(3). |
\fBpcrepartial\fP(d), \fBpcrepattern\fP(3), \fBpcreprecompile\fP(3). |
681 |
. |
. |
682 |
. |
. |
683 |
.SH AUTHOR |
.SH AUTHOR |
684 |
.rs |
.rs |
685 |
.sp |
.sp |
686 |
|
.nf |
687 |
Philip Hazel |
Philip Hazel |
688 |
.br |
University Computing Service |
|
University Computing Service, |
|
|
.br |
|
689 |
Cambridge CB2 3QH, England. |
Cambridge CB2 3QH, England. |
690 |
.P |
.fi |
691 |
.in 0 |
. |
692 |
Last updated: 30 November 2006 |
. |
693 |
.br |
.SH REVISION |
694 |
Copyright (c) 1997-2006 University of Cambridge. |
.rs |
695 |
|
.sp |
696 |
|
.nf |
697 |
|
Last updated: 21 August 2007 |
698 |
|
Copyright (c) 1997-2007 University of Cambridge. |
699 |
|
.fi |