Re: [pcre-dev] PCRE 7.3 release candidate for testing

Top Pagina
Delete this message
Auteur: Sheri
Datum:  
Aan: pcre-dev
Onderwerp: Re: [pcre-dev] PCRE 7.3 release candidate for testing
Philip Hazel wrote:
> On Mon, 20 Aug 2007, Philip Hazel wrote:
>
>
>> Another thought. The skip over CRLF feature was for patterns containing
>> dots (e.g. ".+A") to avoid matching \nA in the string "\r\nA". On
>> thinking this over, perhaps the feature should occur only when CRLF is
>> the *only* valid newline sequence. For ANY or ANYCRLF, dot will also
>> fail to match \n, and so wouldn't give a problem there.
>>
>> But no doubt that would lead to other problems. I now see why Perl had
>> dodged this issue by converting line endings on input and output.
>>
>
> On my way home I had a further thought: It might be possible to restrict
> the "skip 2" case to instances where the match has failed because . hit
> a newline. For any other failure it would just skip 1 as usual. That
> would, I think cover the cases that matter, wouldn't it? I'll look at
> the code with that in mind tomorrow.
>
> Philip
>
>

Hi Philip,

That sounds promising. Multiline ^ and $ need to continue to behave
properly (e.g., change 15 for version 7.1 which prevents "(?m)^$" from
matching between the the \r and \n in "A\r\nB" for ANY and ANYCRLF
hopefully doesn't depend in part on the skip routine.

Regards,
Sheri