[pcre-dev] [Bug 1315] \r, \n and $ matching seems to be ill…

Góra strony
Delete this message
Autor: Philip Hazel
Data:  
Dla: pcre-dev
Temat: [pcre-dev] [Bug 1315] \r, \n and $ matching seems to be illogical or not fully documented.
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1315




--- Comment #8 from Philip Hazel <ph10@???> 2012-11-09 16:10:06 ---
On Fri, 9 Nov 2012, Zoltan Herczeg wrote:

> > This pattern does that: \r(?<!\n)
>
> I think Philip wanted a forward assertion, not a backward, since this pattern
> search for a \r character, and moves the position by one character ahead, and
> checks that the last character is not \n, which is always true (\r != \n).
>
> The correct form of this patern is: \r(?!\n)


Ooops! Yes, indeed I did. Thinko. Sorry about that.

Philip


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email