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

Top Page
Delete this message
Author: Zoltan Herczeg
Date:  
To: pcre-dev
Subject: [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 #7 from Zoltan Herczeg <hzmester@???> 2012-11-09 13:18:50 ---
> 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)


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