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

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

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

revision 566 by ph10, Wed Jun 16 10:51:15 2010 UTC revision 567 by ph10, Sat Nov 6 17:10:00 2010 UTC
# Line 254  begins with a lookbehind assertion (incl Line 254  begins with a lookbehind assertion (incl
254  If any call to <b>pcre_exec()</b> in a <b>/g</b> or <b>/G</b> sequence matches an  If any call to <b>pcre_exec()</b> in a <b>/g</b> or <b>/G</b> sequence matches an
255  empty string, the next call is done with the PCRE_NOTEMPTY_ATSTART and  empty string, the next call is done with the PCRE_NOTEMPTY_ATSTART and
256  PCRE_ANCHORED flags set in order to search for another, non-empty, match at the  PCRE_ANCHORED flags set in order to search for another, non-empty, match at the
257  same point. If this second match fails, the start offset is advanced by one  same point. If this second match fails, the start offset is advanced, and the
258  character, and the normal match is retried. This imitates the way Perl handles  normal match is retried. This imitates the way Perl handles such cases when
259  such cases when using the <b>/g</b> modifier or the <b>split()</b> function.  using the <b>/g</b> modifier or the <b>split()</b> function. Normally, the start
260    offset is advanced by one character, but if the newline convention recognizes
261    CRLF as a newline, and the current character is CR followed by LF, an advance
262    of two is used.
263  </P>  </P>
264  <br><b>  <br><b>
265  Other modifiers  Other modifiers
# Line 412  recognized: Line 415  recognized:
415    \Y         pass the PCRE_NO_START_OPTIMIZE option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>    \Y         pass the PCRE_NO_START_OPTIMIZE option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>
416    \Z         pass the PCRE_NOTEOL option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>    \Z         pass the PCRE_NOTEOL option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>
417    \?         pass the PCRE_NO_UTF8_CHECK option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>    \?         pass the PCRE_NO_UTF8_CHECK option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>
418    \&#62;dd       start the match at offset dd (any number of digits);    \&#62;dd       start the match at offset dd (optional "-"; then any number of digits); this sets the <i>startoffset</i>
419                 this sets the <i>startoffset</i> argument for <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>                 argument for <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>
420    \&#60;cr&#62;      pass the PCRE_NEWLINE_CR option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>    \&#60;cr&#62;      pass the PCRE_NEWLINE_CR option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>
421    \&#60;lf&#62;      pass the PCRE_NEWLINE_LF option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>    \&#60;lf&#62;      pass the PCRE_NEWLINE_LF option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>
422    \&#60;crlf&#62;    pass the PCRE_NEWLINE_CRLF option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>    \&#60;crlf&#62;    pass the PCRE_NEWLINE_CRLF option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>
# Line 489  When a match succeeds, pcretest outputs Line 492  When a match succeeds, pcretest outputs
492  <b>pcre_exec()</b> returns, starting with number 0 for the string that matched  <b>pcre_exec()</b> returns, starting with number 0 for the string that matched
493  the whole pattern. Otherwise, it outputs "No match" when the return is  the whole pattern. Otherwise, it outputs "No match" when the return is
494  PCRE_ERROR_NOMATCH, and "Partial match:" followed by the partially matching  PCRE_ERROR_NOMATCH, and "Partial match:" followed by the partially matching
495  substring when <b>pcre_exec()</b> returns PCRE_ERROR_PARTIAL. For any other  substring when <b>pcre_exec()</b> returns PCRE_ERROR_PARTIAL. (Note that this is
496  returns, it outputs the PCRE negative error number. Here is an example of an  the entire substring that was inspected during the partial match; it may
497  interactive <b>pcretest</b> run.  include characters before the actual match start if a lookbehind assertion,
498    \K, \b, or \B was involved.) For any other returns, it outputs the PCRE
499    negative error number. Here is an example of an interactive <b>pcretest</b> run.
500  <pre>  <pre>
501    $ pcretest    $ pcretest
502    PCRE version 7.0 30-Nov-2006    PCRE version 7.0 30-Nov-2006
# Line 573  the subject where there is at least one Line 578  the subject where there is at least one
578  (Using the normal matching function on this data finds only "tang".) The  (Using the normal matching function on this data finds only "tang".) The
579  longest matching string is always given first (and numbered zero). After a  longest matching string is always given first (and numbered zero). After a
580  PCRE_ERROR_PARTIAL return, the output is "Partial match:", followed by the  PCRE_ERROR_PARTIAL return, the output is "Partial match:", followed by the
581  partially matching substring.  partially matching substring. (Note that this is the entire substring that was
582    inspected during the partial match; it may include characters before the actual
583    match start if a lookbehind assertion, \K, \b, or \B was involved.)
584  </P>  </P>
585  <P>  <P>
586  If <b>/g</b> is present on the pattern, the search for further matches resumes  If <b>/g</b> is present on the pattern, the search for further matches resumes
# Line 740  Cambridge CB2 3QH, England. Line 747  Cambridge CB2 3QH, England.
747  </P>  </P>
748  <br><a name="SEC15" href="#TOC1">REVISION</a><br>  <br><a name="SEC15" href="#TOC1">REVISION</a><br>
749  <P>  <P>
750  Last updated: 14 June 2010  Last updated: 06 November 2010
751  <br>  <br>
752  Copyright &copy; 1997-2010 University of Cambridge.  Copyright &copy; 1997-2010 University of Cambridge.
753  <br>  <br>

Legend:
Removed from v.566  
changed lines
  Added in v.567

  ViewVC Help
Powered by ViewVC 1.1.5