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

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

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

revision 1458 by ph10, Tue Nov 19 15:36:57 2013 UTC revision 1459 by ph10, Tue Mar 4 10:45:15 2014 UTC
# Line 29  man page, in case the conversion went wr Line 29  man page, in case the conversion went wr
29  <li><a name="TOC14" href="#SEC14">ATOMIC GROUPS</a>  <li><a name="TOC14" href="#SEC14">ATOMIC GROUPS</a>
30  <li><a name="TOC15" href="#SEC15">COMMENT</a>  <li><a name="TOC15" href="#SEC15">COMMENT</a>
31  <li><a name="TOC16" href="#SEC16">OPTION SETTING</a>  <li><a name="TOC16" href="#SEC16">OPTION SETTING</a>
32  <li><a name="TOC17" href="#SEC17">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a>  <li><a name="TOC17" href="#SEC17">NEWLINE CONVENTION</a>
33  <li><a name="TOC18" href="#SEC18">BACKREFERENCES</a>  <li><a name="TOC18" href="#SEC18">WHAT \R MATCHES</a>
34  <li><a name="TOC19" href="#SEC19">SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)</a>  <li><a name="TOC19" href="#SEC19">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a>
35  <li><a name="TOC20" href="#SEC20">CONDITIONAL PATTERNS</a>  <li><a name="TOC20" href="#SEC20">BACKREFERENCES</a>
36  <li><a name="TOC21" href="#SEC21">BACKTRACKING CONTROL</a>  <li><a name="TOC21" href="#SEC21">SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)</a>
37  <li><a name="TOC22" href="#SEC22">NEWLINE CONVENTIONS</a>  <li><a name="TOC22" href="#SEC22">CONDITIONAL PATTERNS</a>
38  <li><a name="TOC23" href="#SEC23">WHAT \R MATCHES</a>  <li><a name="TOC23" href="#SEC23">BACKTRACKING CONTROL</a>
39  <li><a name="TOC24" href="#SEC24">CALLOUTS</a>  <li><a name="TOC24" href="#SEC24">CALLOUTS</a>
40  <li><a name="TOC25" href="#SEC25">SEE ALSO</a>  <li><a name="TOC25" href="#SEC25">SEE ALSO</a>
41  <li><a name="TOC26" href="#SEC26">AUTHOR</a>  <li><a name="TOC26" href="#SEC26">AUTHOR</a>
# Line 339  but some of them use Unicode properties Line 339  but some of them use Unicode properties
339  <P>  <P>
340  <pre>  <pre>
341    \K          reset start of match    \K          reset start of match
342  </PRE>  </pre>
343    \K is honoured in positive assertions, but ignored in negative ones.
344  </P>  </P>
345  <br><a name="SEC12" href="#TOC1">ALTERNATION</a><br>  <br><a name="SEC12" href="#TOC1">ALTERNATION</a><br>
346  <P>  <P>
# Line 382  but some of them use Unicode properties Line 383  but some of them use Unicode properties
383    (?x)            extended (ignore white space)    (?x)            extended (ignore white space)
384    (?-...)         unset option(s)    (?-...)         unset option(s)
385  </pre>  </pre>
386  The following are recognized only at the start of a pattern or after one of the  The following are recognized only at the very start of a pattern or after one
387  newline-setting options with similar syntax:  of the newline or \R options with similar syntax. More than one of them may
388    appear.
389  <pre>  <pre>
390    (*LIMIT_MATCH=d) set the match limit to d (decimal number)    (*LIMIT_MATCH=d) set the match limit to d (decimal number)
391    (*LIMIT_RECURSION=d) set the recursion limit to d (decimal number)    (*LIMIT_RECURSION=d) set the recursion limit to d (decimal number)
392      (*NO_AUTO_POSSESS) no auto-possessification (PCRE_NO_AUTO_POSSESS)
393    (*NO_START_OPT) no start-match optimization (PCRE_NO_START_OPTIMIZE)    (*NO_START_OPT) no start-match optimization (PCRE_NO_START_OPTIMIZE)
394    (*UTF8)         set UTF-8 mode: 8-bit library (PCRE_UTF8)    (*UTF8)         set UTF-8 mode: 8-bit library (PCRE_UTF8)
395    (*UTF16)        set UTF-16 mode: 16-bit library (PCRE_UTF16)    (*UTF16)        set UTF-16 mode: 16-bit library (PCRE_UTF16)
# Line 397  newline-setting options with similar syn Line 400  newline-setting options with similar syn
400  Note that LIMIT_MATCH and LIMIT_RECURSION can only reduce the value of the  Note that LIMIT_MATCH and LIMIT_RECURSION can only reduce the value of the
401  limits set by the caller of pcre_exec(), not increase them.  limits set by the caller of pcre_exec(), not increase them.
402  </P>  </P>
403  <br><a name="SEC17" href="#TOC1">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a><br>  <br><a name="SEC17" href="#TOC1">NEWLINE CONVENTION</a><br>
404    <P>
405    These are recognized only at the very start of the pattern or after option
406    settings with a similar syntax.
407    <pre>
408      (*CR)           carriage return only
409      (*LF)           linefeed only
410      (*CRLF)         carriage return followed by linefeed
411      (*ANYCRLF)      all three of the above
412      (*ANY)          any Unicode newline sequence
413    </PRE>
414    </P>
415    <br><a name="SEC18" href="#TOC1">WHAT \R MATCHES</a><br>
416    <P>
417    These are recognized only at the very start of the pattern or after option
418    setting with a similar syntax.
419    <pre>
420      (*BSR_ANYCRLF)  CR, LF, or CRLF
421      (*BSR_UNICODE)  any Unicode newline sequence
422    </PRE>
423    </P>
424    <br><a name="SEC19" href="#TOC1">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a><br>
425  <P>  <P>
426  <pre>  <pre>
427    (?=...)         positive look ahead    (?=...)         positive look ahead
# Line 407  limits set by the caller of pcre_exec(), Line 431  limits set by the caller of pcre_exec(),
431  </pre>  </pre>
432  Each top-level branch of a look behind must be of a fixed length.  Each top-level branch of a look behind must be of a fixed length.
433  </P>  </P>
434  <br><a name="SEC18" href="#TOC1">BACKREFERENCES</a><br>  <br><a name="SEC20" href="#TOC1">BACKREFERENCES</a><br>
435  <P>  <P>
436  <pre>  <pre>
437    \n              reference by number (can be ambiguous)    \n              reference by number (can be ambiguous)
# Line 421  Each top-level branch of a look behind m Line 445  Each top-level branch of a look behind m
445    (?P=name)       reference by name (Python)    (?P=name)       reference by name (Python)
446  </PRE>  </PRE>
447  </P>  </P>
448  <br><a name="SEC19" href="#TOC1">SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)</a><br>  <br><a name="SEC21" href="#TOC1">SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)</a><br>
449  <P>  <P>
450  <pre>  <pre>
451    (?R)            recurse whole pattern    (?R)            recurse whole pattern
# Line 440  Each top-level branch of a look behind m Line 464  Each top-level branch of a look behind m
464    \g'-n'          call subpattern by relative number (PCRE extension)    \g'-n'          call subpattern by relative number (PCRE extension)
465  </PRE>  </PRE>
466  </P>  </P>
467  <br><a name="SEC20" href="#TOC1">CONDITIONAL PATTERNS</a><br>  <br><a name="SEC22" href="#TOC1">CONDITIONAL PATTERNS</a><br>
468  <P>  <P>
469  <pre>  <pre>
470    (?(condition)yes-pattern)    (?(condition)yes-pattern)
# Line 459  Each top-level branch of a look behind m Line 483  Each top-level branch of a look behind m
483    (?(assert)...   assertion condition    (?(assert)...   assertion condition
484  </PRE>  </PRE>
485  </P>  </P>
486  <br><a name="SEC21" href="#TOC1">BACKTRACKING CONTROL</a><br>  <br><a name="SEC23" href="#TOC1">BACKTRACKING CONTROL</a><br>
487  <P>  <P>
488  The following act immediately they are reached:  The following act immediately they are reached:
489  <pre>  <pre>
# Line 482  pattern is not anchored. Line 506  pattern is not anchored.
506    (*THEN:NAME)    equivalent to (*MARK:NAME)(*THEN)    (*THEN:NAME)    equivalent to (*MARK:NAME)(*THEN)
507  </PRE>  </PRE>
508  </P>  </P>
 <br><a name="SEC22" href="#TOC1">NEWLINE CONVENTIONS</a><br>  
 <P>  
 These are recognized only at the very start of the pattern or after a  
 (*BSR_...), (*UTF8), (*UTF16), (*UTF32) or (*UCP) option.  
 <pre>  
   (*CR)           carriage return only  
   (*LF)           linefeed only  
   (*CRLF)         carriage return followed by linefeed  
   (*ANYCRLF)      all three of the above  
   (*ANY)          any Unicode newline sequence  
 </PRE>  
 </P>  
 <br><a name="SEC23" href="#TOC1">WHAT \R MATCHES</a><br>  
 <P>  
 These are recognized only at the very start of the pattern or after a  
 (*...) option that sets the newline convention or a UTF or UCP mode.  
 <pre>  
   (*BSR_ANYCRLF)  CR, LF, or CRLF  
   (*BSR_UNICODE)  any Unicode newline sequence  
 </PRE>  
 </P>  
509  <br><a name="SEC24" href="#TOC1">CALLOUTS</a><br>  <br><a name="SEC24" href="#TOC1">CALLOUTS</a><br>
510  <P>  <P>
511  <pre>  <pre>
# Line 526  Cambridge CB2 3QH, England. Line 529  Cambridge CB2 3QH, England.
529  </P>  </P>
530  <br><a name="SEC27" href="#TOC1">REVISION</a><br>  <br><a name="SEC27" href="#TOC1">REVISION</a><br>
531  <P>  <P>
532  Last updated: 12 November 2013  Last updated: 08 January 2014
533  <br>  <br>
534  Copyright &copy; 1997-2013 University of Cambridge.  Copyright &copy; 1997-2014 University of Cambridge.
535  <br>  <br>
536  <p>  <p>
537  Return to the <a href="index.html">PCRE index page</a>.  Return to the <a href="index.html">PCRE index page</a>.

Legend:
Removed from v.1458  
changed lines
  Added in v.1459

  ViewVC Help
Powered by ViewVC 1.1.5