/[pcre]/code/trunk/doc/pcrepattern.3
ViewVC logotype

Diff of /code/trunk/doc/pcrepattern.3

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 964 by ph10, Fri May 4 13:03:39 2012 UTC revision 968 by ph10, Sat May 26 14:22:52 2012 UTC
# Line 198  In a UTF mode, only ASCII numbers and le Line 198  In a UTF mode, only ASCII numbers and le
198  backslash. All other characters (in particular, those whose codepoints are  backslash. All other characters (in particular, those whose codepoints are
199  greater than 127) are treated as literals.  greater than 127) are treated as literals.
200  .P  .P
201  If a pattern is compiled with the PCRE_EXTENDED option, whitespace in the  If a pattern is compiled with the PCRE_EXTENDED option, white space in the
202  pattern (other than in a character class) and characters between a # outside  pattern (other than in a character class) and characters between a # outside
203  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
204  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.
205  .P  .P
206  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
207  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 237  one of the following escape sequences th Line 237  one of the following escape sequences th
237    \ea        alarm, that is, the BEL character (hex 07)    \ea        alarm, that is, the BEL character (hex 07)
238    \ecx       "control-x", where x is any ASCII character    \ecx       "control-x", where x is any ASCII character
239    \ee        escape (hex 1B)    \ee        escape (hex 1B)
240    \ef        formfeed (hex 0C)    \ef        form feed (hex 0C)
241    \en        linefeed (hex 0A)    \en        linefeed (hex 0A)
242    \er        carriage return (hex 0D)    \er        carriage return (hex 0D)
243    \et        tab (hex 09)    \et        tab (hex 09)
# Line 399  Another use of backslash is for specifyi Line 399  Another use of backslash is for specifyi
399  .sp  .sp
400    \ed     any decimal digit    \ed     any decimal digit
401    \eD     any character that is not a decimal digit    \eD     any character that is not a decimal digit
402    \eh     any horizontal whitespace character    \eh     any horizontal white space character
403    \eH     any character that is not a horizontal whitespace character    \eH     any character that is not a horizontal white space character
404    \es     any whitespace character    \es     any white space character
405    \eS     any character that is not a whitespace character    \eS     any character that is not a white space character
406    \ev     any vertical whitespace character    \ev     any vertical white space character
407    \eV     any character that is not a vertical whitespace character    \eV     any character that is not a vertical white space character
408    \ew     any "word" character    \ew     any "word" character
409    \eW     any "non-word" character    \eW     any "non-word" character
410  .sp  .sp
# Line 493  The vertical space characters are: Line 493  The vertical space characters are:
493  .sp  .sp
494    U+000A     Linefeed    U+000A     Linefeed
495    U+000B     Vertical tab    U+000B     Vertical tab
496    U+000C     Formfeed    U+000C     Form feed
497    U+000D     Carriage return    U+000D     Carriage return
498    U+0085     Next line    U+0085     Next line
499    U+2028     Line separator    U+2028     Line separator
# Line 520  below. Line 520  below.
520  .\"  .\"
521  This particular group matches either the two-character sequence CR followed by  This particular group matches either the two-character sequence CR followed by
522  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,
523  U+000B), FF (formfeed, U+000C), CR (carriage return, U+000D), or NEL (next  U+000B), FF (form feed, U+000C), CR (carriage return, U+000D), or NEL (next
524  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
525  cannot be split.  cannot be split.
526  .P  .P
# Line 819  PCRE_UCP is set. They are: Line 819  PCRE_UCP is set. They are:
819    Xwd   Any Perl "word" character    Xwd   Any Perl "word" character
820  .sp  .sp
821  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)
822  property. Xps matches the characters tab, linefeed, vertical tab, formfeed, or  property. Xps matches the characters tab, linefeed, vertical tab, form feed, or
823  carriage return, and any other character that has the Z (separator) property.  carriage return, and any other character that has the Z (separator) property.
824  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
825  same characters as Xan, plus underscore.  same characters as Xan, plus underscore.
# Line 1843  Because there may be many capturing pare Line 1843  Because there may be many capturing pare
1843  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.
1844  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
1845  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
1846  whitespace. Otherwise, the \eg{ syntax or an empty comment (see  white space. Otherwise, the \eg{ syntax or an empty comment (see
1847  .\" HTML <a href="#comments">  .\" HTML <a href="#comments">
1848  .\" </a>  .\" </a>
1849  "Comments"  "Comments"
# Line 2200  subroutines that can be referenced from Line 2200  subroutines that can be referenced from
2200  subroutines  subroutines
2201  .\"  .\"
2202  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
2203  "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
2204  breaks):  breaks):
2205  .sp  .sp
2206    (?(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) )

Legend:
Removed from v.964  
changed lines
  Added in v.968

  ViewVC Help
Powered by ViewVC 1.1.5