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

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

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

revision 787 by ph10, Mon Dec 5 12:33:44 2011 UTC revision 788 by ph10, Tue Dec 6 15:38:01 2011 UTC
# Line 269  one of the following escape sequences th Line 269  one of the following escape sequences th
269    \ddd      character with octal code ddd, or back reference    \ddd      character with octal code ddd, or back reference
270    \xhh      character with hex code hh    \xhh      character with hex code hh
271    \x{hhh..} character with hex code hhh.. (non-JavaScript mode)    \x{hhh..} character with hex code hhh.. (non-JavaScript mode)
272    \uhhhh    character with hex code hhhh (JavaScript mode only)    \uhhhh    character with hex code hhhh (JavaScript mode only)
273  </pre>  </pre>
274  The precise effect of \cx is as follows: if x is a lower case letter, it  The precise effect of \cx is as follows: if x is a lower case letter, it
275  is converted to upper case. Then bit 6 of the character (hex 40) is inverted.  is converted to upper case. Then bit 6 of the character (hex 40) is inverted.
# Line 295  initial \x will be interpreted as a basi Line 295  initial \x will be interpreted as a basi
295  following digits, giving a character whose value is zero.  following digits, giving a character whose value is zero.
296  </P>  </P>
297  <P>  <P>
298  If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \x is  If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \x is
299  as just described only when it is followed by two hexadecimal digits.  as just described only when it is followed by two hexadecimal digits.
300  Otherwise, it matches a literal "x" character. In JavaScript mode, support for  Otherwise, it matches a literal "x" character. In JavaScript mode, support for
301  code points greater than 256 is provided by \u, which must be followed by  code points greater than 256 is provided by \u, which must be followed by
302  four hexadecimal digits; otherwise it matches a literal "u" character.  four hexadecimal digits; otherwise it matches a literal "u" character.
303  </P>  </P>
304  <P>  <P>
305  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
306  syntaxes for \x (or by \u in JavaScript mode). There is no difference in the  syntaxes for \x (or by \u in JavaScript mode). There is no difference in the
307  way they are handled. For example, \xdc is exactly the same as \x{dc} (or  way they are handled. For example, \xdc is exactly the same as \x{dc} (or
308  \u00dc in JavaScript mode).  \u00dc in JavaScript mode).
309  </P>  </P>
310  <P>  <P>
# Line 411  Another use of backslash is for specifyi Line 411  Another use of backslash is for specifyi
411  There is also the single sequence \N, which matches a non-newline character.  There is also the single sequence \N, which matches a non-newline character.
412  This is the same as  This is the same as
413  <a href="#fullstopdot">the "." metacharacter</a>  <a href="#fullstopdot">the "." metacharacter</a>
414  when PCRE_DOTALL is not set. Perl also uses \N to match characters by name;  when PCRE_DOTALL is not set. Perl also uses \N to match characters by name;
415  PCRE does not support this.  PCRE does not support this.
416  </P>  </P>
417  <P>  <P>
# Line 2562  when calling <b>pcre_compile()</b> or <b Line 2562  when calling <b>pcre_compile()</b> or <b
2562  pattern with (*NO_START_OPT).  pattern with (*NO_START_OPT).
2563  </P>  </P>
2564  <P>  <P>
2565  Experiments with Perl suggest that it too has similar optimizations, sometimes  Experiments with Perl suggest that it too has similar optimizations, sometimes
2566  leading to anomalous results.  leading to anomalous results.
2567  </P>  </P>
2568  <br><b>  <br><b>
# Line 2612  A name is always required with this verb Line 2612  A name is always required with this verb
2612  (*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.
2613  </P>  </P>
2614  <P>  <P>
2615  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
2616  path is passed back to the caller via the <i>pcre_extra</i> data structure, as  path is passed back to the caller via the <i>pcre_extra</i> data structure, as
2617  described in the  described in the
2618  <a href="pcreapi.html#extradata">section on <i>pcre_extra</i></a>  <a href="pcreapi.html#extradata">section on <i>pcre_extra</i></a>
# Line 2648  After a partial match or a failed match, Line 2648  After a partial match or a failed match,
2648    No match, mark = B    No match, mark = B
2649  </pre>  </pre>
2650  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
2651  attempt that started at the letter "X". Subsequent match attempts starting at  attempt that started at the letter "X". Subsequent match attempts starting at
2652  "P" and then with an empty string do not get as far as the (*MARK) item, but  "P" and then with an empty string do not get as far as the (*MARK) item, but
2653  nevertheless do not reset it.  nevertheless do not reset it.
2654  </P>  </P>
2655  <br><b>  <br><b>

Legend:
Removed from v.787  
changed lines
  Added in v.788

  ViewVC Help
Powered by ViewVC 1.1.5