Diff for /embedaddon/pcre/doc/pcrepattern.3 between versions 1.1 and 1.1.1.3

version 1.1, 2012/02/21 23:05:52 version 1.1.1.3, 2012/10/09 09:19:17
Line 1 Line 1
.TH PCREPATTERN 3.TH PCREPATTERN 3 "04 May 2012" "PCRE 8.31"
 .SH NAME  .SH NAME
 PCRE - Perl-compatible regular expressions  PCRE - Perl-compatible regular expressions
 .SH "PCRE REGULAR EXPRESSION DETAILS"  .SH "PCRE REGULAR EXPRESSION DETAILS"
Line 21  published by O'Reilly, covers regular expressions in g Line 21  published by O'Reilly, covers regular expressions in g
 description of PCRE's regular expressions is intended as reference material.  description of PCRE's regular expressions is intended as reference material.
 .P  .P
 The original operation of PCRE was on strings of one-byte characters. However,  The original operation of PCRE was on strings of one-byte characters. However,
there is now also support for UTF-8 character strings. To use this,there is now also support for UTF-8 strings in the original library, and a
PCRE must be built to include UTF-8 support, and you must callsecond library that supports 16-bit and UTF-16 character strings. To use these
\fBpcre_compile()\fP or \fBpcre_compile2()\fP with the PCRE_UTF8 option. Therefeatures, PCRE must be built to include appropriate support. When using UTF
is also a special sequence that can be given at the start of a pattern:strings you must either call the compiling function with the PCRE_UTF8 or
 PCRE_UTF16 option, or the pattern must start with one of these special
 sequences:
 .sp  .sp
   (*UTF8)    (*UTF8)
     (*UTF16)
 .sp  .sp
Starting a pattern with this sequence is equivalent to setting the PCRE_UTF8Starting a pattern with such a sequence is equivalent to setting the relevant
option. This feature is not Perl-compatible. How setting UTF-8 mode affectsoption. This feature is not Perl-compatible. How setting a UTF mode affects
 pattern matching is mentioned in several places below. There is also a summary  pattern matching is mentioned in several places below. There is also a summary
of UTF-8 features in theof features in the
 .\" HREF  .\" HREF
 \fBpcreunicode\fP  \fBpcreunicode\fP
 .\"  .\"
 page.  page.
 .P  .P
 Another special sequence that may appear at the start of a pattern or in  Another special sequence that may appear at the start of a pattern or in
combination with (*UTF8) is:combination with (*UTF8) or (*UTF16) is:
 .sp  .sp
   (*UCP)    (*UCP)
 .sp  .sp
Line 53  also some more of these special sequences that are con Line 56  also some more of these special sequences that are con
 of newlines; they are described below.  of newlines; they are described below.
 .P  .P
 The remainder of this document discusses the patterns that are supported by  The remainder of this document discusses the patterns that are supported by
PCRE when its main matching function, \fBpcre_exec()\fP, is used.PCRE when one its main matching functions, \fBpcre_exec()\fP (8-bit) or
From release 6.0, PCRE offers a second matching function,\fBpcre16_exec()\fP (16-bit), is used. PCRE also has alternative matching
\fBpcre_dfa_exec()\fP, which matches using a different algorithm that is notfunctions, \fBpcre_dfa_exec()\fP and \fBpcre16_dfa_exec()\fP, which match using
Perl-compatible. Some of the features discussed below are not available whena different algorithm that is not Perl-compatible. Some of the features
\fBpcre_dfa_exec()\fP is used. The advantages and disadvantages of thediscussed below are not available when DFA matching is used. The advantages and
alternative function, and how it differs from the normal function, aredisadvantages of the alternative functions, and how they differ from the normal
discussed in thefunctions, are discussed in the
 .\" HREF  .\" HREF
 \fBpcrematching\fP  \fBpcrematching\fP
 .\"  .\"
Line 94  string with one of the following five sequences: Line 97  string with one of the following five sequences:
   (*ANYCRLF)   any of the three above    (*ANYCRLF)   any of the three above
   (*ANY)       all Unicode newline sequences    (*ANY)       all Unicode newline sequences
 .sp  .sp
These override the default and the options given to \fBpcre_compile()\fP orThese override the default and the options given to the compiling function. For
\fBpcre_compile2()\fP. For example, on a Unix system where LF is the defaultexample, on a Unix system where LF is the default newline sequence, the pattern
newline sequence, the pattern 
 .sp  .sp
   (*CR)a.b    (*CR)a.b
 .sp  .sp
Line 130  corresponding characters in the subject. As a trivial  Line 132  corresponding characters in the subject. As a trivial 
 .sp  .sp
 matches a portion of a subject string that is identical to itself. When  matches a portion of a subject string that is identical to itself. When
 caseless matching is specified (the PCRE_CASELESS option), letters are matched  caseless matching is specified (the PCRE_CASELESS option), letters are matched
independently of case. In UTF-8 mode, PCRE always understands the concept ofindependently of case. In a UTF mode, PCRE always understands the concept of
 case for characters whose values are less than 128, so caseless matching is  case for characters whose values are less than 128, so caseless matching is
 always possible. For characters with higher values, the concept of case is  always possible. For characters with higher values, the concept of case is
 supported if PCRE is compiled with Unicode property support, but not otherwise.  supported if PCRE is compiled with Unicode property support, but not otherwise.
 If you want to use caseless matching for characters 128 and above, you must  If you want to use caseless matching for characters 128 and above, you must
 ensure that PCRE is compiled with Unicode property support as well as with  ensure that PCRE is compiled with Unicode property support as well as with
UTF-8 support.UTF support.
 .P  .P
 The power of regular expressions comes from the ability to include alternatives  The power of regular expressions comes from the ability to include alternatives
 and repetitions in the pattern. These are encoded in the pattern by the use of  and repetitions in the pattern. These are encoded in the pattern by the use of
Line 192  otherwise be interpreted as a metacharacter, so it is  Line 194  otherwise be interpreted as a metacharacter, so it is 
 non-alphanumeric with backslash to specify that it stands for itself. In  non-alphanumeric with backslash to specify that it stands for itself. In
 particular, if you want to match a backslash, you write \e\e.  particular, if you want to match a backslash, you write \e\e.
 .P  .P
In UTF-8 mode, only ASCII numbers and letters have any special meaning after aIn a UTF mode, only ASCII numbers and letters have any special meaning after a
 backslash. All other characters (in particular, those whose codepoints are  backslash. All other characters (in particular, those whose codepoints are
 greater than 127) are treated as literals.  greater than 127) are treated as literals.
 .P  .P
If a pattern is compiled with the PCRE_EXTENDED option, whitespace in theIf a pattern is compiled with the PCRE_EXTENDED option, white space in the
 pattern (other than in a character class) and characters between a # outside  pattern (other than in a character class) and characters between a # outside
 a character class and the next newline are ignored. An escaping backslash can  a character class and the next newline are ignored. An escaping backslash can
be used to include a whitespace or # character as part of the pattern.be used to include a white space or # character as part of the pattern.
 .P  .P
 If you want to remove the special meaning from a sequence of characters, you  If you want to remove the special meaning from a sequence of characters, you
 can do so by putting them between \eQ and \eE. This is different from Perl in  can do so by putting them between \eQ and \eE. This is different from Perl in
Line 235  one of the following escape sequences than the binary  Line 237  one of the following escape sequences than the binary 
   \ea        alarm, that is, the BEL character (hex 07)    \ea        alarm, that is, the BEL character (hex 07)
   \ecx       "control-x", where x is any ASCII character    \ecx       "control-x", where x is any ASCII character
   \ee        escape (hex 1B)    \ee        escape (hex 1B)
  \ef        formfeed (hex 0C)  \ef        form feed (hex 0C)
   \en        linefeed (hex 0A)    \en        linefeed (hex 0A)
   \er        carriage return (hex 0D)    \er        carriage return (hex 0D)
   \et        tab (hex 09)    \et        tab (hex 09)
Line 249  is converted to upper case. Then bit 6 of the characte Line 251  is converted to upper case. Then bit 6 of the characte
 Thus \ecz becomes hex 1A (z is 7A), but \ec{ becomes hex 3B ({ is 7B), while  Thus \ecz becomes hex 1A (z is 7A), but \ec{ becomes hex 3B ({ is 7B), while
 \ec; becomes hex 7B (; is 3B). If the byte following \ec has a value greater  \ec; becomes hex 7B (; is 3B). If the byte following \ec has a value greater
 than 127, a compile-time error occurs. This locks out non-ASCII characters in  than 127, a compile-time error occurs. This locks out non-ASCII characters in
both byte mode and UTF-8 mode. (When PCRE is compiled in EBCDIC mode, all byteall modes. (When PCRE is compiled in EBCDIC mode, all byte values are valid. A
values are valid. A lower case letter is converted to upper case, and then thelower case letter is converted to upper case, and then the 0xc0 bits are
0xc0 bits are flipped.)flipped.)
 .P  .P
 By default, after \ex, from zero to two hexadecimal digits are read (letters  By default, after \ex, from zero to two hexadecimal digits are read (letters
 can be in upper or lower case). Any number of hexadecimal digits may appear  can be in upper or lower case). Any number of hexadecimal digits may appear
between \ex{ and }, but the value of the character code must be less than 256between \ex{ and }, but the character code is constrained as follows:
in non-UTF-8 mode, and less than 2**31 in UTF-8 mode. That is, the maximum.sp
value in hexadecimal is 7FFFFFFF. Note that this is bigger than the largest  8-bit non-UTF mode    less than 0x100
Unicode code point, which is 10FFFF.  8-bit UTF-8 mode      less than 0x10ffff and a valid codepoint
   16-bit non-UTF mode   less than 0x10000
   16-bit UTF-16 mode    less than 0x10ffff and a valid codepoint
 .sp
 Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-called
 "surrogate" codepoints).
 .P  .P
 If characters other than hexadecimal digits appear between \ex{ and }, or if  If characters other than hexadecimal digits appear between \ex{ and }, or if
 there is no terminating }, this form of escape is not recognized. Instead, the  there is no terminating }, this form of escape is not recognized. Instead, the
Line 270  as just described only when it is followed by two hexa Line 277  as just described only when it is followed by two hexa
 Otherwise, it matches a literal "x" character. In JavaScript mode, support for  Otherwise, it matches a literal "x" character. In JavaScript mode, support for
 code points greater than 256 is provided by \eu, which must be followed by  code points greater than 256 is provided by \eu, which must be followed by
 four hexadecimal digits; otherwise it matches a literal "u" character.  four hexadecimal digits; otherwise it matches a literal "u" character.
   Character codes specified by \eu in JavaScript mode are constrained in the same
   was as those specified by \ex in non-JavaScript mode.
 .P  .P
 Characters whose value is less than 256 can be defined by either of the two  Characters whose value is less than 256 can be defined by either of the two
 syntaxes for \ex (or by \eu in JavaScript mode). There is no difference in the  syntaxes for \ex (or by \eu in JavaScript mode). There is no difference in the
Line 300  parenthesized subpatterns. Line 309  parenthesized subpatterns.
 Inside a character class, or if the decimal number is greater than 9 and there  Inside a character class, or if the decimal number is greater than 9 and there
 have not been that many capturing subpatterns, PCRE re-reads up to three octal  have not been that many capturing subpatterns, PCRE re-reads up to three octal
 digits following the backslash, and uses them to generate a data character. Any  digits following the backslash, and uses them to generate a data character. Any
subsequent digits stand for themselves. In non-UTF-8 mode, the value of asubsequent digits stand for themselves. The value of the character is
character specified in octal must be less than \e400. In UTF-8 mode, values upconstrained in the same way as characters specified in hexadecimal.
to \e777 are permitted. For example:For example:
 .sp  .sp
   \e040   is another way of writing a space    \e040   is another way of writing a space
 .\" JOIN  .\" JOIN
Line 319  to \e777 are permitted. For example: Line 328  to \e777 are permitted. For example:
             character with octal code 113              character with octal code 113
 .\" JOIN  .\" JOIN
   \e377   might be a back reference, otherwise    \e377   might be a back reference, otherwise
            the byte consisting entirely of 1 bits            the value 255 (decimal)
 .\" JOIN  .\" JOIN
   \e81    is either a back reference, or a binary zero    \e81    is either a back reference, or a binary zero
             followed by the two characters "8" and "1"              followed by the two characters "8" and "1"
Line 392  Another use of backslash is for specifying generic cha Line 401  Another use of backslash is for specifying generic cha
 .sp  .sp
   \ed     any decimal digit    \ed     any decimal digit
   \eD     any character that is not a decimal digit    \eD     any character that is not a decimal digit
  \eh     any horizontal whitespace character  \eh     any horizontal white space character
  \eH     any character that is not a horizontal whitespace character  \eH     any character that is not a horizontal white space character
  \es     any whitespace character  \es     any white space character
  \eS     any character that is not a whitespace character  \eS     any character that is not a white space character
  \ev     any vertical whitespace character  \ev     any vertical white space character
  \eV     any character that is not a vertical whitespace character  \eV     any character that is not a vertical white space character
   \ew     any "word" character    \ew     any "word" character
   \eW     any "non-word" character    \eW     any "non-word" character
 .sp  .sp
Line 440  or "french" in Windows, some character codes greater t Line 449  or "french" in Windows, some character codes greater t
 accented letters, and these are then matched by \ew. The use of locales with  accented letters, and these are then matched by \ew. The use of locales with
 Unicode is discouraged.  Unicode is discouraged.
 .P  .P
By default, in UTF-8 mode, characters with values greater than 128 never matchBy default, in a UTF mode, characters with values greater than 128 never match
 \ed, \es, or \ew, and always match \eD, \eS, and \eW. These sequences retain  \ed, \es, or \ew, and always match \eD, \eS, and \eW. These sequences retain
their original meanings from before UTF-8 support was available, mainly fortheir original meanings from before UTF support was available, mainly for
 efficiency reasons. However, if PCRE is compiled with Unicode property support,  efficiency reasons. However, if PCRE is compiled with Unicode property support,
 and the PCRE_UCP option is set, the behaviour is changed so that Unicode  and the PCRE_UCP option is set, the behaviour is changed so that Unicode
 properties are used to determine character types, as follows:  properties are used to determine character types, as follows:
Line 459  is noticeably slower when PCRE_UCP is set. Line 468  is noticeably slower when PCRE_UCP is set.
 .P  .P
 The sequences \eh, \eH, \ev, and \eV are features that were added to Perl at  The sequences \eh, \eH, \ev, and \eV are features that were added to Perl at
 release 5.10. In contrast to the other sequences, which match only ASCII  release 5.10. In contrast to the other sequences, which match only ASCII
characters by default, these always match certain high-valued codepoints incharacters by default, these always match certain high-valued codepoints,
UTF-8 mode, whether or not PCRE_UCP is set. The horizontal space characterswhether or not PCRE_UCP is set. The horizontal space characters are:
are: 
 .sp  .sp
   U+0009     Horizontal tab    U+0009     Horizontal tab
   U+0020     Space    U+0020     Space
Line 487  The vertical space characters are: Line 495  The vertical space characters are:
 .sp  .sp
   U+000A     Linefeed    U+000A     Linefeed
   U+000B     Vertical tab    U+000B     Vertical tab
  U+000C     Formfeed  U+000C     Form feed
   U+000D     Carriage return    U+000D     Carriage return
   U+0085     Next line    U+0085     Next line
   U+2028     Line separator    U+2028     Line separator
   U+2029     Paragraph separator    U+2029     Paragraph separator
   .sp
   In 8-bit, non-UTF-8 mode, only the characters with codepoints less than 256 are
   relevant.
 .  .
 .  .
 .\" HTML <a name="newlineseq"></a>  .\" HTML <a name="newlineseq"></a>
Line 499  The vertical space characters are: Line 510  The vertical space characters are:
 .rs  .rs
 .sp  .sp
 Outside a character class, by default, the escape sequence \eR matches any  Outside a character class, by default, the escape sequence \eR matches any
Unicode newline sequence. In non-UTF-8 mode \eR is equivalent to the following:Unicode newline sequence. In 8-bit non-UTF-8 mode \eR is equivalent to the
 following:
 .sp  .sp
   (?>\er\en|\en|\ex0b|\ef|\er|\ex85)    (?>\er\en|\en|\ex0b|\ef|\er|\ex85)
 .sp  .sp
Line 510  below. Line 522  below.
 .\"  .\"
 This particular group matches either the two-character sequence CR followed by  This particular group matches either the two-character sequence CR followed by
 LF, or one of the single characters LF (linefeed, U+000A), VT (vertical tab,  LF, or one of the single characters LF (linefeed, U+000A), VT (vertical tab,
U+000B), FF (formfeed, U+000C), CR (carriage return, U+000D), or NEL (nextU+000B), FF (form feed, U+000C), CR (carriage return, U+000D), or NEL (next
 line, U+0085). The two-character sequence is treated as a single unit that  line, U+0085). The two-character sequence is treated as a single unit that
 cannot be split.  cannot be split.
 .P  .P
In UTF-8 mode, two additional characters whose codepoints are greater than 255In other modes, two additional characters whose codepoints are greater than 255
 are added: LS (line separator, U+2028) and PS (paragraph separator, U+2029).  are added: LS (line separator, U+2028) and PS (paragraph separator, U+2029).
 Unicode character property support is not needed for these characters to be  Unicode character property support is not needed for these characters to be
 recognized.  recognized.
Line 530  one of the following sequences: Line 542  one of the following sequences:
   (*BSR_ANYCRLF)   CR, LF, or CRLF only    (*BSR_ANYCRLF)   CR, LF, or CRLF only
   (*BSR_UNICODE)   any Unicode newline sequence    (*BSR_UNICODE)   any Unicode newline sequence
 .sp  .sp
These override the default and the options given to \fBpcre_compile()\fP orThese override the default and the options given to the compiling function, but
\fBpcre_compile2()\fP, but they can be overridden by options given tothey can themselves be overridden by options given to a matching function. Note
\fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP. Note that these special settings,that these special settings, which are not Perl-compatible, are recognized only
which are not Perl-compatible, are recognized only at the very start of aat the very start of a pattern, and that they must be in upper case. If more
pattern, and that they must be in upper case. If more than one of them isthan one of them is present, the last one is used. They can be combined with a
present, the last one is used. They can be combined with a change of newlinechange of newline convention; for example, a pattern can start with:
convention; for example, a pattern can start with: 
 .sp  .sp
   (*ANY)(*BSR_ANYCRLF)    (*ANY)(*BSR_ANYCRLF)
 .sp  .sp
They can also be combined with the (*UTF8) or (*UCP) special sequences. InsideThey can also be combined with the (*UTF8), (*UTF16), or (*UCP) special
a character class, \eR is treated as an unrecognized escape sequence, and sosequences. Inside a character class, \eR is treated as an unrecognized escape
matches the letter "R" by default, but causes an error if PCRE_EXTRA is set.sequence, and so matches the letter "R" by default, but causes an error if
 PCRE_EXTRA is set.
 .  .
 .  .
 .\" HTML <a name="uniextseq"></a>  .\" HTML <a name="uniextseq"></a>
Line 551  matches the letter "R" by default, but causes an error Line 563  matches the letter "R" by default, but causes an error
 .sp  .sp
 When PCRE is built with Unicode character property support, three additional  When PCRE is built with Unicode character property support, three additional
 escape sequences that match characters with specific properties are available.  escape sequences that match characters with specific properties are available.
When not in UTF-8 mode, these sequences are of course limited to testingWhen in 8-bit non-UTF-8 mode, these sequences are of course limited to testing
 characters whose codepoints are less than 256, but they do work in this mode.  characters whose codepoints are less than 256, but they do work in this mode.
 The extra escape sequences are:  The extra escape sequences are:
 .sp  .sp
Line 586  Armenian, Line 598  Armenian,
 Avestan,  Avestan,
 Balinese,  Balinese,
 Bamum,  Bamum,
   Batak,
 Bengali,  Bengali,
 Bopomofo,  Bopomofo,
   Brahmi,
 Braille,  Braille,
 Buginese,  Buginese,
 Buhid,  Buhid,
 Canadian_Aboriginal,  Canadian_Aboriginal,
 Carian,  Carian,
   Chakma,
 Cham,  Cham,
 Cherokee,  Cherokee,
 Common,  Common,
Line 635  Lisu, Line 650  Lisu,
 Lycian,  Lycian,
 Lydian,  Lydian,
 Malayalam,  Malayalam,
   Mandaic,
 Meetei_Mayek,  Meetei_Mayek,
   Meroitic_Cursive,
   Meroitic_Hieroglyphs,
   Miao,
 Mongolian,  Mongolian,
 Myanmar,  Myanmar,
 New_Tai_Lue,  New_Tai_Lue,
Line 654  Rejang, Line 673  Rejang,
 Runic,  Runic,
 Samaritan,  Samaritan,
 Saurashtra,  Saurashtra,
   Sharada,
 Shavian,  Shavian,
 Sinhala,  Sinhala,
   Sora_Sompeng,
 Sundanese,  Sundanese,
 Syloti_Nagri,  Syloti_Nagri,
 Syriac,  Syriac,
Line 664  Tagbanwa, Line 685  Tagbanwa,
 Tai_Le,  Tai_Le,
 Tai_Tham,  Tai_Tham,
 Tai_Viet,  Tai_Viet,
   Takri,
 Tamil,  Tamil,
 Telugu,  Telugu,
 Thaana,  Thaana,
Line 738  the Lu, Ll, or Lt property, in other words, a letter t Line 760  the Lu, Ll, or Lt property, in other words, a letter t
 a modifier or "other".  a modifier or "other".
 .P  .P
 The Cs (Surrogate) property applies only to characters in the range U+D800 to  The Cs (Surrogate) property applies only to characters in the range U+D800 to
U+DFFF. Such characters are not valid in UTF-8 strings (see RFC 3629) and soU+DFFF. Such characters are not valid in Unicode strings and so
cannot be tested by PCRE, unless UTF-8 validity checking has been turned offcannot be tested by PCRE, unless UTF validity checking has been turned off
(see the discussion of PCRE_NO_UTF8_CHECK in the(see the discussion of PCRE_NO_UTF8_CHECK and PCRE_NO_UTF16_CHECK in the
 .\" HREF  .\" HREF
 \fBpcreapi\fP  \fBpcreapi\fP
 .\"  .\"
Line 771  atomic group Line 793  atomic group
 .\"  .\"
 Characters with the "mark" property are typically accents that affect the  Characters with the "mark" property are typically accents that affect the
 preceding character. None of them have codepoints less than 256, so in  preceding character. None of them have codepoints less than 256, so in
non-UTF-8 mode \eX matches any one character.8-bit non-UTF-8 mode \eX matches any one character.
 .P  .P
 Note that recent versions of Perl have changed \eX to match what Unicode calls  Note that recent versions of Perl have changed \eX to match what Unicode calls
 an "extended grapheme cluster", which has a more complicated definition.  an "extended grapheme cluster", which has a more complicated definition.
Line 780  Matching characters by Unicode property is not fast, b Line 802  Matching characters by Unicode property is not fast, b
 a structure that contains data for over fifteen thousand characters. That is  a structure that contains data for over fifteen thousand characters. That is
 why the traditional escape sequences such as \ed and \ew do not use Unicode  why the traditional escape sequences such as \ed and \ew do not use Unicode
 properties in PCRE by default, though you can make them do so by setting the  properties in PCRE by default, though you can make them do so by setting the
PCRE_UCP option for \fBpcre_compile()\fP or by starting the pattern withPCRE_UCP option or by starting the pattern with (*UCP).
(*UCP). 
 .  .
 .  .
 .\" HTML <a name="extraprops"></a>  .\" HTML <a name="extraprops"></a>
Line 800  PCRE_UCP is set. They are: Line 821  PCRE_UCP is set. They are:
   Xwd   Any Perl "word" character    Xwd   Any Perl "word" character
 .sp  .sp
 Xan matches characters that have either the L (letter) or the N (number)  Xan matches characters that have either the L (letter) or the N (number)
property. Xps matches the characters tab, linefeed, vertical tab, formfeed, orproperty. Xps matches the characters tab, linefeed, vertical tab, form feed, or
 carriage return, and any other character that has the Z (separator) property.  carriage return, and any other character that has the Z (separator) property.
 Xsp is the same as Xps, except that vertical tab is excluded. Xwd matches the  Xsp is the same as Xps, except that vertical tab is excluded. Xwd matches the
 same characters as Xan, plus underscore.  same characters as Xan, plus underscore.
Line 870  escape sequence" error is generated instead. Line 891  escape sequence" error is generated instead.
 A word boundary is a position in the subject string where the current character  A word boundary is a position in the subject string where the current character
 and the previous character do not both match \ew or \eW (i.e. one matches  and the previous character do not both match \ew or \eW (i.e. one matches
 \ew and the other matches \eW), or the start or end of the string if the  \ew and the other matches \eW), or the start or end of the string if the
first or last character matches \ew, respectively. In UTF-8 mode, the meaningsfirst or last character matches \ew, respectively. In a UTF mode, the meanings
 of \ew and \eW can be changed by setting the PCRE_UCP option. When this is  of \ew and \eW can be changed by setting the PCRE_UCP option. When this is
 done, it also affects \eb and \eB. Neither PCRE nor Perl has a separate "start  done, it also affects \eb and \eB. Neither PCRE nor Perl has a separate "start
 of word" or "end of word" metasequence. However, whatever follows \eb normally  of word" or "end of word" metasequence. However, whatever follows \eb normally
Line 965  end of the subject in both modes, and if all branches  Line 986  end of the subject in both modes, and if all branches 
 .sp  .sp
 Outside a character class, a dot in the pattern matches any one character in  Outside a character class, a dot in the pattern matches any one character in
 the subject string except (by default) a character that signifies the end of a  the subject string except (by default) a character that signifies the end of a
line. In UTF-8 mode, the matched character may be more than one byte long.line.
 .P  .P
 When a line ending is defined as a single character, dot never matches that  When a line ending is defined as a single character, dot never matches that
 character; when the two-character sequence CRLF is used, dot does not match CR  character; when the two-character sequence CRLF is used, dot does not match CR
Line 989  that signifies the end of a line. Perl also uses \eN t Line 1010  that signifies the end of a line. Perl also uses \eN t
 name; PCRE does not support this.  name; PCRE does not support this.
 .  .
 .  .
.SH "MATCHING A SINGLE BYTE".SH "MATCHING A SINGLE DATA UNIT"
 .rs  .rs
 .sp  .sp
Outside a character class, the escape sequence \eC matches any one byte, bothOutside a character class, the escape sequence \eC matches any one data unit,
in and out of UTF-8 mode. Unlike a dot, it always matches line-endingwhether or not a UTF mode is set. In the 8-bit library, one data unit is one
characters. The feature is provided in Perl in order to match individual bytesbyte; in the 16-bit library it is a 16-bit unit. Unlike a dot, \eC always
in UTF-8 mode, but it is unclear how it can usefully be used. Because \eCmatches line-ending characters. The feature is provided in Perl in order to
breaks up characters into individual bytes, matching one byte with \eC in UTF-8match individual bytes in UTF-8 mode, but it is unclear how it can usefully be
mode means that the rest of the string may start with a malformed UTF-8used. Because \eC breaks up characters into individual data units, matching one
character. This has undefined results, because PCRE assumes that it is dealingunit with \eC in a UTF mode means that the rest of the string may start with a
with valid UTF-8 strings (and by default it checks this at the start ofmalformed UTF character. This has undefined results, because PCRE assumes that
processing unless the PCRE_NO_UTF8_CHECK option is used).it is dealing with valid UTF strings (and by default it checks this at the
 start of processing unless the PCRE_NO_UTF8_CHECK or PCRE_NO_UTF16_CHECK option
 is used).
 .P  .P
 PCRE does not allow \eC to appear in lookbehind assertions  PCRE does not allow \eC to appear in lookbehind assertions
 .\" HTML <a href="#lookbehind">  .\" HTML <a href="#lookbehind">
 .\" </a>  .\" </a>
 (described below)  (described below)
 .\"  .\"
in UTF-8 mode, because this would make it impossible to calculate the length ofin a UTF mode, because this would make it impossible to calculate the length of
 the lookbehind.  the lookbehind.
 .P  .P
In general, the \eC escape sequence is best avoided in UTF-8 mode. However, oneIn general, the \eC escape sequence is best avoided. However, one
way of using it that avoids the problem of malformed UTF-8 characters is toway of using it that avoids the problem of malformed UTF characters is to use a
use a lookahead to check the length of the next character, as in this patternlookahead to check the length of the next character, as in this pattern, which
(ignore white space and line breaks):could be used with a UTF-8 string (ignore white space and line breaks):
 .sp  .sp
   (?| (?=[\ex00-\ex7f])(\eC) |    (?| (?=[\ex00-\ex7f])(\eC) |
       (?=[\ex80-\ex{7ff}])(\eC)(\eC) |        (?=[\ex80-\ex{7ff}])(\eC)(\eC) |
Line 1043  bracket causes a compile-time error. If a closing squa Line 1066  bracket causes a compile-time error. If a closing squa
 a member of the class, it should be the first data character in the class  a member of the class, it should be the first data character in the class
 (after an initial circumflex, if present) or escaped with a backslash.  (after an initial circumflex, if present) or escaped with a backslash.
 .P  .P
A character class matches a single character in the subject. In UTF-8 mode, theA character class matches a single character in the subject. In a UTF mode, the
character may be more than one byte long. A matched character must be in thecharacter may be more than one data unit long. A matched character must be in
set of characters defined by the class, unless the first character in the classthe set of characters defined by the class, unless the first character in the
definition is a circumflex, in which case the subject character must not be inclass definition is a circumflex, in which case the subject character must not
the set defined by the class. If a circumflex is actually required as a memberbe in the set defined by the class. If a circumflex is actually required as a
of the class, ensure it is not the first character, or escape it with amember of the class, ensure it is not the first character, or escape it with a
 backslash.  backslash.
 .P  .P
 For example, the character class [aeiou] matches any lower case vowel, while  For example, the character class [aeiou] matches any lower case vowel, while
Line 1059  circumflex is not an assertion; it still consumes a ch Line 1082  circumflex is not an assertion; it still consumes a ch
 string, and therefore it fails if the current pointer is at the end of the  string, and therefore it fails if the current pointer is at the end of the
 string.  string.
 .P  .P
In UTF-8 mode, characters with values greater than 255 can be included in aIn UTF-8 (UTF-16) mode, characters with values greater than 255 (0xffff) can be
class as a literal string of bytes, or by using the \ex{ escaping mechanism.included in a class as a literal string of data units, or by using the \ex{
 escaping mechanism.
 .P  .P
 When caseless matching is set, any letters in a class represent both their  When caseless matching is set, any letters in a class represent both their
 upper case and lower case versions, so for example, a caseless [aeiou] matches  upper case and lower case versions, so for example, a caseless [aeiou] matches
 "A" as well as "a", and a caseless [^aeiou] does not match "A", whereas a  "A" as well as "a", and a caseless [^aeiou] does not match "A", whereas a
caseful version would. In UTF-8 mode, PCRE always understands the concept ofcaseful version would. In a UTF mode, PCRE always understands the concept of
 case for characters whose values are less than 128, so caseless matching is  case for characters whose values are less than 128, so caseless matching is
 always possible. For characters with higher values, the concept of case is  always possible. For characters with higher values, the concept of case is
 supported if PCRE is compiled with Unicode property support, but not otherwise.  supported if PCRE is compiled with Unicode property support, but not otherwise.
If you want to use caseless matching in UTF8-mode for characters 128 and above,If you want to use caseless matching in a UTF mode for characters 128 and
you must ensure that PCRE is compiled with Unicode property support as well asabove, you must ensure that PCRE is compiled with Unicode property support as
with UTF-8 support.well as with UTF support.
 .P  .P
 Characters that might indicate line breaks are never treated in any special way  Characters that might indicate line breaks are never treated in any special way
 when matching character classes, whatever line-ending sequence is in use, and  when matching character classes, whatever line-ending sequence is in use, and
Line 1093  followed by two other characters. The octal or hexadec Line 1117  followed by two other characters. The octal or hexadec
 "]" can also be used to end a range.  "]" can also be used to end a range.
 .P  .P
 Ranges operate in the collating sequence of character values. They can also be  Ranges operate in the collating sequence of character values. They can also be
used for characters specified numerically, for example [\e000-\e037]. In UTF-8used for characters specified numerically, for example [\e000-\e037]. Ranges
mode, ranges can include characters whose values are greater than 255, forcan include any characters that are valid for the current mode.
example [\ex{100}-\ex{2ff}]. 
 .P  .P
 If a range that includes letters is used when caseless matching is set, it  If a range that includes letters is used when caseless matching is set, it
 matches the letters in either case. For example, [W-c] is equivalent to  matches the letters in either case. For example, [W-c] is equivalent to
[][\e\e^_`wxyzabc], matched caselessly, and in non-UTF-8 mode, if character[][\e\e^_`wxyzabc], matched caselessly, and in a non-UTF mode, if character
 tables for a French locale are in use, [\exc8-\excb] matches accented E  tables for a French locale are in use, [\exc8-\excb] matches accented E
characters in both cases. In UTF-8 mode, PCRE supports the concept of case forcharacters in both cases. In UTF modes, PCRE supports the concept of case for
 characters with values greater than 128 only when it is compiled with Unicode  characters with values greater than 128 only when it is compiled with Unicode
 property support.  property support.
 .P  .P
 The character escape sequences \ed, \eD, \eh, \eH, \ep, \eP, \es, \eS, \ev,  The character escape sequences \ed, \eD, \eh, \eH, \ep, \eP, \es, \eS, \ev,
 \eV, \ew, and \eW may appear in a character class, and add the characters that  \eV, \ew, and \eW may appear in a character class, and add the characters that
 they match to the class. For example, [\edABCDEF] matches any hexadecimal  they match to the class. For example, [\edABCDEF] matches any hexadecimal
digit. In UTF-8 mode, the PCRE_UCP option affects the meanings of \ed, \es, \ewdigit. In UTF modes, the PCRE_UCP option affects the meanings of \ed, \es, \ew
 and their upper case partners, just as it does when they appear outside a  and their upper case partners, just as it does when they appear outside a
 character class, as described in the section entitled  character class, as described in the section entitled
 .\" HTML <a href="#genericchartypes">  .\" HTML <a href="#genericchartypes">
Line 1178  matches "1", "2", or any non-digit. PCRE (and Perl) al Line 1201  matches "1", "2", or any non-digit. PCRE (and Perl) al
 syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not  syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not
 supported, and an error is given if they are encountered.  supported, and an error is given if they are encountered.
 .P  .P
By default, in UTF-8 mode, characters with values greater than 128 do not matchBy default, in UTF modes, characters with values greater than 128 do not match
 any of the POSIX character classes. However, if the PCRE_UCP option is passed  any of the POSIX character classes. However, if the PCRE_UCP option is passed
 to \fBpcre_compile()\fP, some of the classes are changed so that Unicode  to \fBpcre_compile()\fP, some of the classes are changed so that Unicode
 character properties are used. This is achieved by replacing the POSIX classes  character properties are used. This is achieved by replacing the POSIX classes
Line 1266  option settings happen at compile time. There would be Line 1289  option settings happen at compile time. There would be
 behaviour otherwise.  behaviour otherwise.
 .P  .P
 \fBNote:\fP There are other PCRE-specific options that can be set by the  \fBNote:\fP There are other PCRE-specific options that can be set by the
application when the compile or match functions are called. In some cases theapplication when the compiling or matching functions are called. In some cases
pattern can contain special leading sequences such as (*CRLF) to override whatthe pattern can contain special leading sequences such as (*CRLF) to override
the application has set or what has been defaulted. Details are given in thewhat the application has set or what has been defaulted. Details are given in
section entitledthe section entitled
 .\" HTML <a href="#newlineseq">  .\" HTML <a href="#newlineseq">
 .\" </a>  .\" </a>
 "Newline sequences"  "Newline sequences"
 .\"  .\"
above. There are also the (*UTF8) and (*UCP) leading sequences that can be usedabove. There are also the (*UTF8), (*UTF16), and (*UCP) leading sequences that
to set UTF-8 and Unicode property modes; they are equivalent to setting thecan be used to set UTF and Unicode property modes; they are equivalent to
PCRE_UTF8 and the PCRE_UCP options, respectively.setting the PCRE_UTF8, PCRE_UTF16, and the PCRE_UCP options, respectively.
 .  .
 .  .
 .\" HTML <a name="subpattern"></a>  .\" HTML <a name="subpattern"></a>
Line 1295  match "cataract", "erpillar" or an empty string. Line 1318  match "cataract", "erpillar" or an empty string.
 .sp  .sp
 2. It sets up the subpattern as a capturing subpattern. This means that, when  2. It sets up the subpattern as a capturing subpattern. This means that, when
 the whole pattern matches, that portion of the subject string that matched the  the whole pattern matches, that portion of the subject string that matched the
subpattern is passed back to the caller via the \fIovector\fP argument ofsubpattern is passed back to the caller via the \fIovector\fP argument of the
\fBpcre_exec()\fP. Opening parentheses are counted from left to right (startingmatching function. (This applies only to the traditional matching functions;
from 1) to obtain numbers for the capturing subpatterns. For example, if thethe DFA matching functions do not support capturing.)
string "the red king" is matched against the pattern.P
 Opening parentheses are counted from left to right (starting from 1) to obtain
 numbers for the capturing subpatterns. For example, if the string "the red
 king" is matched against the pattern
 .sp  .sp
   the ((red|white) (king|queen))    the ((red|white) (king|queen))
 .sp  .sp
Line 1474  items: Line 1500  items:
   a literal data character    a literal data character
   the dot metacharacter    the dot metacharacter
   the \eC escape sequence    the \eC escape sequence
  the \eX escape sequence (in UTF-8 mode with Unicode properties)  the \eX escape sequence
   the \eR escape sequence    the \eR escape sequence
   an escape such as \ed or \epL that matches a single character    an escape such as \ed or \epL that matches a single character
   a character class    a character class
Line 1505  where a quantifier is not allowed, or one that does no Line 1531  where a quantifier is not allowed, or one that does no
 quantifier, is taken as a literal character. For example, {,6} is not a  quantifier, is taken as a literal character. For example, {,6} is not a
 quantifier, but a literal string of four characters.  quantifier, but a literal string of four characters.
 .P  .P
In UTF-8 mode, quantifiers apply to UTF-8 characters rather than to individualIn UTF modes, quantifiers apply to characters rather than to individual data
bytes. Thus, for example, \ex{100}{2} matches two UTF-8 characters, each ofunits. Thus, for example, \ex{100}{2} matches two characters, each of
which is represented by a two-byte sequence. Similarly, when Unicode propertywhich is represented by a two-byte sequence in a UTF-8 string. Similarly,
support is available, \eX{3} matches three Unicode extended sequences, each of\eX{3} matches three Unicode extended sequences, each of which may be several
which may be several bytes long (and they may be of different lengths).data units long (and they may be of different lengths).
 .P  .P
 The quantifier {0} is permitted, causing the expression to behave as if the  The quantifier {0} is permitted, causing the expression to behave as if the
 previous item and the quantifier were not present. This may be useful for  previous item and the quantifier were not present. This may be useful for
Line 1819  Because there may be many capturing parentheses in a p Line 1845  Because there may be many capturing parentheses in a p
 following a backslash are taken as part of a potential back reference number.  following a backslash are taken as part of a potential back reference number.
 If the pattern continues with a digit character, some delimiter must be used to  If the pattern continues with a digit character, some delimiter must be used to
 terminate the back reference. If the PCRE_EXTENDED option is set, this can be  terminate the back reference. If the PCRE_EXTENDED option is set, this can be
whitespace. Otherwise, the \eg{ syntax or an empty comment (seewhite space. Otherwise, the \eg{ syntax or an empty comment (see
 .\" HTML <a href="#comments">  .\" HTML <a href="#comments">
 .\" </a>  .\" </a>
 "Comments"  "Comments"
Line 1972  temporarily move the current position back by the fixe Line 1998  temporarily move the current position back by the fixe
 match. If there are insufficient characters before the current position, the  match. If there are insufficient characters before the current position, the
 assertion fails.  assertion fails.
 .P  .P
In UTF-8 mode, PCRE does not allow the \eC escape (which matches a single byte,In a UTF mode, PCRE does not allow the \eC escape (which matches a single data
even in UTF-8 mode) to appear in lookbehind assertions, because it makes itunit even in a UTF mode) to appear in lookbehind assertions, because it makes
impossible to calculate the length of the lookbehind. The \eX and \eR escapes,it impossible to calculate the length of the lookbehind. The \eX and \eR
which can match different numbers of bytes, are also not permitted.escapes, which can match different numbers of data units, are also not
 permitted.
 .P  .P
 .\" HTML <a href="#subpatternsassubroutines">  .\" HTML <a href="#subpatternsassubroutines">
 .\" </a>  .\" </a>
Line 2175  subroutines that can be referenced from elsewhere. (Th Line 2202  subroutines that can be referenced from elsewhere. (Th
 subroutines  subroutines
 .\"  .\"
 is described below.) For example, a pattern to match an IPv4 address such as  is described below.) For example, a pattern to match an IPv4 address such as
"192.168.23.245" could be written like this (ignore whitespace and line"192.168.23.245" could be written like this (ignore white space and line
 breaks):  breaks):
 .sp  .sp
   (?(DEFINE) (?<byte> 2[0-4]\ed | 25[0-5] | 1\ed\ed | [1-9]?\ed) )    (?(DEFINE) (?<byte> 2[0-4]\ed | 25[0-5] | 1\ed\ed | [1-9]?\ed) )
Line 2222  closing parenthesis. Nested parentheses are not permit Line 2249  closing parenthesis. Nested parentheses are not permit
 option is set, an unescaped # character also introduces a comment, which in  option is set, an unescaped # character also introduces a comment, which in
 this case continues to immediately after the next newline character or  this case continues to immediately after the next newline character or
 character sequence in the pattern. Which characters are interpreted as newlines  character sequence in the pattern. Which characters are interpreted as newlines
is controlled by the options passed to \fBpcre_compile()\fP or by a specialis controlled by the options passed to a compiling function or by a special
 sequence at the start of the pattern, as described in the section entitled  sequence at the start of the pattern, as described in the section entitled
 .\" HTML <a href="#newlines">  .\" HTML <a href="#newlines">
 .\" </a>  .\" </a>
Line 2524  same pair of parentheses when there is a repetition. Line 2551  same pair of parentheses when there is a repetition.
 .P  .P
 PCRE provides a similar feature, but of course it cannot obey arbitrary Perl  PCRE provides a similar feature, but of course it cannot obey arbitrary Perl
 code. The feature is called "callout". The caller of PCRE provides an external  code. The feature is called "callout". The caller of PCRE provides an external
function by putting its entry point in the global variable \fIpcre_callout\fP.function by putting its entry point in the global variable \fIpcre_callout\fP
By default, this variable contains NULL, which disables all calling out.(8-bit library) or \fIpcre16_callout\fP (16-bit library). By default, this
 variable contains NULL, which disables all calling out.
 .P  .P
 Within a regular expression, (?C) indicates the points at which the external  Within a regular expression, (?C) indicates the points at which the external
 function is to be called. If you want to identify different callout points, you  function is to be called. If you want to identify different callout points, you
Line 2534  For example, this pattern has two callout points: Line 2562  For example, this pattern has two callout points:
 .sp  .sp
   (?C1)abc(?C2)def    (?C1)abc(?C2)def
 .sp  .sp
If the PCRE_AUTO_CALLOUT flag is passed to \fBpcre_compile()\fP, callouts areIf the PCRE_AUTO_CALLOUT flag is passed to a compiling function, callouts are
 automatically installed before each item in the pattern. They are all numbered  automatically installed before each item in the pattern. They are all numbered
 255.  255.
 .P  .P
During matching, when PCRE reaches a callout point (and \fIpcre_callout\fP isDuring matching, when PCRE reaches a callout point, the external function is
set), the external function is called. It is provided with the number of thecalled. It is provided with the number of the callout, the position in the
callout, the position in the pattern, and, optionally, one item of datapattern, and, optionally, one item of data originally supplied by the caller of
originally supplied by the caller of \fBpcre_exec()\fP. The callout functionthe matching function. The callout function may cause matching to proceed, to
may cause matching to proceed, to backtrack, or to fail altogether. A completebacktrack, or to fail altogether. A complete description of the interface to
description of the interface to the callout function is given in thethe callout function is given in the
 .\" HREF  .\" HREF
 \fBpcrecallout\fP  \fBpcrecallout\fP
 .\"  .\"
Line 2561  production code should be noted to avoid problems duri Line 2589  production code should be noted to avoid problems duri
 remarks apply to the PCRE features described in this section.  remarks apply to the PCRE features described in this section.
 .P  .P
 Since these verbs are specifically related to backtracking, most of them can be  Since these verbs are specifically related to backtracking, most of them can be
used only when the pattern is to be matched using \fBpcre_exec()\fP, which usesused only when the pattern is to be matched using one of the traditional
a backtracking algorithm. With the exception of (*FAIL), which behaves like amatching functions, which use a backtracking algorithm. With the exception of
failing negative assertion, they cause an error if encountered by(*FAIL), which behaves like a failing negative assertion, they cause an error
\fBpcre_dfa_exec()\fP.if encountered by a DFA matching function.
 .P  .P
 If any of these verbs are used in an assertion or in a subpattern that is  If any of these verbs are used in an assertion or in a subpattern that is
 called as a subroutine (whether or not recursively), their effect is confined  called as a subroutine (whether or not recursively), their effect is confined
Line 2573  exception: the name from a *(MARK), (*PRUNE), or (*THE Line 2601  exception: the name from a *(MARK), (*PRUNE), or (*THE
 a successful positive assertion \fIis\fP passed back when a match succeeds  a successful positive assertion \fIis\fP passed back when a match succeeds
 (compare capturing parentheses in assertions). Note that such subpatterns are  (compare capturing parentheses in assertions). Note that such subpatterns are
 processed as anchored at the point where they are tested. Note also that Perl's  processed as anchored at the point where they are tested. Note also that Perl's
treatment of subroutines is different in some cases.treatment of subroutines and assertions is different in some cases.
 .P  .P
 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
 parenthesis followed by an asterisk. They are generally of the form  parenthesis followed by an asterisk. They are generally of the form
 (*VERB) or (*VERB:NAME). Some may take either form, with differing behaviour,  (*VERB) or (*VERB:NAME). Some may take either form, with differing behaviour,
 depending on whether or not an argument is present. A name is any sequence of  depending on whether or not an argument is present. A name is any sequence of
characters that does not include a closing parenthesis. If the name is empty,characters that does not include a closing parenthesis. The maximum length of
that is, if the closing parenthesis immediately follows the colon, the effectname is 255 in the 8-bit library and 65535 in the 16-bit library. If the name
is as if the colon were not there. Any number of these verbs may occur in ais empty, that is, if the closing parenthesis immediately follows the colon,
pattern.the effect is as if the colon were not there. Any number of these verbs may
.Poccur in a pattern.
 .
 .
 .\" HTML <a name="nooptimize"></a>
 .SS "Optimizations that affect backtracking verbs"
 .rs
 .sp
 PCRE contains some optimizations that are used to speed up matching by running  PCRE contains some optimizations that are used to speed up matching by running
 some checks at the start of each match attempt. For example, it may know the  some checks at the start of each match attempt. For example, it may know the
 minimum length of matching subject, or that a particular character must be  minimum length of matching subject, or that a particular character must be
Line 2591  present. When one of these optimizations suppresses th Line 2625  present. When one of these optimizations suppresses th
 included backtracking verbs will not, of course, be processed. You can suppress  included backtracking verbs will not, of course, be processed. You can suppress
 the start-of-match optimizations by setting the PCRE_NO_START_OPTIMIZE option  the start-of-match optimizations by setting the PCRE_NO_START_OPTIMIZE option
 when calling \fBpcre_compile()\fP or \fBpcre_exec()\fP, or by starting the  when calling \fBpcre_compile()\fP or \fBpcre_exec()\fP, or by starting the
pattern with (*NO_START_OPT).pattern with (*NO_START_OPT). There is more discussion of this option in the
 section entitled
 .\" HTML <a href="pcreapi.html#execoptions">
 .\" </a>
 "Option bits for \fBpcre_exec()\fP"
 .\"
 in the
 .\" HREF
 \fBpcreapi\fP
 .\"
 documentation.
 .P  .P
 Experiments with Perl suggest that it too has similar optimizations, sometimes  Experiments with Perl suggest that it too has similar optimizations, sometimes
 leading to anomalous results.  leading to anomalous results.
Line 2643  A name is always required with this verb. There may be Line 2687  A name is always required with this verb. There may be
 (*MARK) as you like in a pattern, and their names do not have to be unique.  (*MARK) as you like in a pattern, and their names do not have to be unique.
 .P  .P
 When a match succeeds, the name of the last-encountered (*MARK) on the matching  When a match succeeds, the name of the last-encountered (*MARK) on the matching
path is passed back to the caller via the \fIpcre_extra\fP data structure, aspath is passed back to the caller as described in the section entitled
described in the 
 .\" HTML <a href="pcreapi.html#extradata">  .\" HTML <a href="pcreapi.html#extradata">
 .\" </a>  .\" </a>
section on \fIpcre_extra\fP"Extra data for \fBpcre_exec()\fP"
 .\"  .\"
 in the  in the
 .\" HREF  .\" HREF
Line 2681  After a partial match or a failed match, the name of t Line 2724  After a partial match or a failed match, the name of t
   No match, mark = B    No match, mark = B
 .sp  .sp
 Note that in this unanchored example the mark is retained from the match  Note that in this unanchored example the mark is retained from the match
attempt that started at the letter "X". Subsequent match attempts starting atattempt that started at the letter "X" in the subject. Subsequent match
"P" and then with an empty string do not get as far as the (*MARK) item, butattempts starting at "P" and then with an empty string do not get as far as the
nevertheless do not reset it.(*MARK) item, but nevertheless do not reset it.
 .P
 If you are interested in (*MARK) values after failed matches, you should
 probably set the PCRE_NO_START_OPTIMIZE option
 .\" HTML <a href="#nooptimize">
 .\" </a>
 (see above)
 .\"
 to ensure that the match is always attempted.
 .  .
 .  .
 .SS "Verbs that act after backtracking"  .SS "Verbs that act after backtracking"
Line 2845  overrides. Line 2896  overrides.
 .rs  .rs
 .sp  .sp
 \fBpcreapi\fP(3), \fBpcrecallout\fP(3), \fBpcrematching\fP(3),  \fBpcreapi\fP(3), \fBpcrecallout\fP(3), \fBpcrematching\fP(3),
\fBpcresyntax\fP(3), \fBpcre\fP(3).\fBpcresyntax\fP(3), \fBpcre\fP(3), \fBpcre16(3)\fP.
 .  .
 .  .
 .SH AUTHOR  .SH AUTHOR
Line 2862  Cambridge CB2 3QH, England. Line 2913  Cambridge CB2 3QH, England.
 .rs  .rs
 .sp  .sp
 .nf  .nf
Last updated: 29 November 2011Last updated: 17 June 2012
Copyright (c) 1997-2011 University of Cambridge.Copyright (c) 1997-2012 University of Cambridge.
 .fi  .fi

Removed from v.1.1  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>