--- code/trunk/doc/html/pcretest.html 2010/11/03 18:32:55 566 +++ code/trunk/doc/html/pcretest.html 2010/11/06 17:10:00 567 @@ -254,9 +254,12 @@ If any call to pcre_exec() in a /g or /G sequence matches an empty string, the next call is done with the PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED flags set in order to search for another, non-empty, match at the -same point. If this second match fails, the start offset is advanced by one -character, and the normal match is retried. This imitates the way Perl handles -such cases when using the /g modifier or the split() function. +same point. If this second match fails, the start offset is advanced, and the +normal match is retried. This imitates the way Perl handles such cases when +using the /g modifier or the split() function. Normally, the start +offset is advanced by one character, but if the newline convention recognizes +CRLF as a newline, and the current character is CR followed by LF, an advance +of two is used.


Other modifiers @@ -412,8 +415,8 @@ \Y pass the PCRE_NO_START_OPTIMIZE option to pcre_exec() or pcre_dfa_exec() \Z pass the PCRE_NOTEOL option to pcre_exec() or pcre_dfa_exec() \? pass the PCRE_NO_UTF8_CHECK option to pcre_exec() or pcre_dfa_exec() - \>dd start the match at offset dd (any number of digits); - this sets the startoffset argument for pcre_exec() or pcre_dfa_exec() + \>dd start the match at offset dd (optional "-"; then any number of digits); this sets the startoffset + argument for pcre_exec() or pcre_dfa_exec() \<cr> pass the PCRE_NEWLINE_CR option to pcre_exec() or pcre_dfa_exec() \<lf> pass the PCRE_NEWLINE_LF option to pcre_exec() or pcre_dfa_exec() \<crlf> pass the PCRE_NEWLINE_CRLF option to pcre_exec() or pcre_dfa_exec() @@ -489,9 +492,11 @@ pcre_exec() returns, starting with number 0 for the string that matched the whole pattern. Otherwise, it outputs "No match" when the return is PCRE_ERROR_NOMATCH, and "Partial match:" followed by the partially matching -substring when pcre_exec() returns PCRE_ERROR_PARTIAL. For any other -returns, it outputs the PCRE negative error number. Here is an example of an -interactive pcretest run. +substring when pcre_exec() returns PCRE_ERROR_PARTIAL. (Note that this is +the entire substring that was inspected during the partial match; it may +include characters before the actual match start if a lookbehind assertion, +\K, \b, or \B was involved.) For any other returns, it outputs the PCRE +negative error number. Here is an example of an interactive pcretest run.
   $ pcretest
   PCRE version 7.0 30-Nov-2006
@@ -573,7 +578,9 @@
 (Using the normal matching function on this data finds only "tang".) The
 longest matching string is always given first (and numbered zero). After a
 PCRE_ERROR_PARTIAL return, the output is "Partial match:", followed by the
-partially matching substring.
+partially matching substring. (Note that this is the entire substring that was
+inspected during the partial match; it may include characters before the actual
+match start if a lookbehind assertion, \K, \b, or \B was involved.)
 

If /g is present on the pattern, the search for further matches resumes @@ -740,7 +747,7 @@


REVISION

-Last updated: 14 June 2010 +Last updated: 06 November 2010
Copyright © 1997-2010 University of Cambridge.