summaryrefslogtreecommitdiff
path: root/pcretest.c
diff options
context:
space:
mode:
authornigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:39:29 +0000
committernigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:39:29 +0000
commitb82aaed025b2fb55a381b51a3cf13a06c2e8ceff (patch)
tree34837270c9c014af7709a8bff05b8d097fa58f7e /pcretest.c
parent88a7c5f66e21a48da1bfc24248379d0e462fd408 (diff)
downloadpcre-b82aaed025b2fb55a381b51a3cf13a06c2e8ceff.tar.gz
Load pcre-3.2 into code/trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@47 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcretest.c')
-rw-r--r--pcretest.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/pcretest.c b/pcretest.c
index 85569fb..bbe9bdd 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -995,10 +995,10 @@ while (!done)
}
/* Failed to match. If this is a /g or /G loop and we previously set
- PCRE_NOTEMPTY after a null match, this is not necessarily the end.
+ g_notempty after a null match, this is not necessarily the end.
We want to advance the start offset, and continue. Fudge the offset
values to achieve this. We won't be at the end of the string - that
- was checked before setting PCRE_NOTEMPTY. */
+ was checked before setting g_notempty. */
else
{
@@ -1025,14 +1025,15 @@ while (!done)
/* If we have matched an empty string, first check to see if we are at
the end of the subject. If so, the /g loop is over. Otherwise, mimic
what Perl's /g options does. This turns out to be rather cunning. First
- we set PCRE_NOTEMPTY and try the match again at the same point. If this
- fails (picked up above) we advance to the next character. */
+ we set PCRE_NOTEMPTY and PCRE_ANCHORED and try the match again at the
+ same point. If this fails (picked up above) we advance to the next
+ character. */
g_notempty = 0;
if (offsets[0] == offsets[1])
{
if (offsets[0] == len) break;
- g_notempty = PCRE_NOTEMPTY;
+ g_notempty = PCRE_NOTEMPTY | PCRE_ANCHORED;
}
/* For /g, update the start offset, leaving the rest alone */