Autor: Philip Hazel Data: A: Sheri CC: pcre-dev Assumpte: Re: [pcre-dev] PCRE 7.3 release candidate for testing
On Mon, 20 Aug 2007, Sheri wrote:
> 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.
Indeed it doesn't.
> FWIW, for my own usage ANYCRLF has been just fine, wonderful even :D.
Oh good, a happy customer! :-)
> That's the reason it became our default. Perhaps there will be fewer
> issues for less informed users when there's a metacharacter for ANYCRLF.
I asked my contact in the Perl developers about that, and he's asking
Larry. I don't really want to introduce one on my own that might be
taken later for something else by Perl. (We coordinated on the
introduction of \R.) Trouble is, there are very few \-letter escapes
left. I know (?>\r\n|[\r\n]) is a lot to type, but it *is* currently
available.
> I haven't seen any apps other than ours extending the newline options to
> user. I previously suggested to Nuno that newline options be made
> available to PHP users (don't know the status). With your fix, the
> option would already be there. Without it, users are stuck with
> whichever newline option was made the default. Which newline would be
> wanted has more to do with the user's data than anything else, and is
> especially useful for processing multiline data with ^ and $ matching
> where they should.
>
> About the issue of it needing to be at the start of the pattern, could
> it possibly also be supported after a leading (?#comment) ?
Not (I currently think) without extra special code, which I'm loath to
introduce just for this case. But I'll think about it; as I write I'm
being niggled by an idea that might make it not so bad.
Philip
--
Philip Hazel, University of Cambridge Computing Service.