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

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: pcre-dev
Subject: Re: [pcre-dev] PCRE 7.3 release candidate for testing
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

--
Philip Hazel, University of Cambridge Computing Service.