Re: [pcre-dev] Unmatched subpattern become wildcard

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: Zoltán Herczeg
CC: pcre-dev
Subject: Re: [pcre-dev] Unmatched subpattern become wildcard
On Wed, 21 Dec 2011, Zoltán Herczeg wrote:

> Just my two cents:
>
> ===================================================================
> --- pcre_exec.c (revision 813)
> +++ pcre_exec.c (working copy)
> @@ -2634,6 +2634,8 @@
>
> if (length == 0) continue;
>
> + if (length < 0) RRETURN(MATCH_NOMATCH);
> +


I'm afraid that is not the correct patch. It is the right place, but the
correct patch is actually this:

    if (length < 0 && min == 0) continue;


Philip

--
Philip Hazel