diff options
| author | Andrey Hristov <andrey@php.net> | 1999-05-28 20:54:52 +0000 |
|---|---|---|
| committer | Andrey Hristov <andrey@php.net> | 1999-05-28 20:54:52 +0000 |
| commit | 3fe94e5b37a1ad8d52a79ae772d0c00018af9bdb (patch) | |
| tree | ee0c60f385407fb651316453eafb4c8231119ec3 /ext/pcre/pcrelib/pcre.c | |
| parent | 62a9f2137ccefb16e1ec56287a7baea481bfd78b (diff) | |
| download | php-git-3fe94e5b37a1ad8d52a79ae772d0c00018af9bdb.tar.gz | |
-Modified PCRE library slightly to do what needs to be done
-Updated preg_replace() code to handle stuff properly
-Removed ability to specify external PCRE library source to link against
(since our bundled version is patched now)
Diffstat (limited to 'ext/pcre/pcrelib/pcre.c')
| -rw-r--r-- | ext/pcre/pcrelib/pcre.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/pcre/pcrelib/pcre.c b/ext/pcre/pcrelib/pcre.c index dd5852dd31..caeeaa4971 100644 --- a/ext/pcre/pcrelib/pcre.c +++ b/ext/pcre/pcrelib/pcre.c @@ -4125,7 +4125,7 @@ Returns: > 0 => success; value is the number of elements filled in int pcre_exec(const pcre *external_re, const pcre_extra *external_extra, - const char *subject, int length, int options, int *offsets, int offsetcount) + const char *subject, int length, int options, int *offsets, int offsetcount, int minlen) { int resetcount, ocount; int first_char = -1; @@ -4287,6 +4287,10 @@ do if (!match(start_match, re->code, 2, &match_block, ims, FALSE, start_match)) continue; + /* Check that the match is not closer than minlen (Andrey Zmievski) */ + if (start_match - match_block.start_subject < minlen) + continue; + /* Copy the offset information from temporary store if necessary */ if (using_temporary_offsets) |
