[pcre-dev] [Bug 1136] Regex fails to compile with PCRE 8.13

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 1136] Regex fails to compile with PCRE 8.13
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

Philip Hazel <ph10@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





--- Comment #2 from Philip Hazel <ph10@???> 2011-08-21 10:06:16 ---
Investigation of this problem indicates that Perl has some odd inconsistencies
in the way it recognizes POSIX class syntax such as [:alpha:]. Change #37 of
PCRE 8.13 tried to make PCRE more like Perl's liberal allowance of characters
in the name, but I broke it. The following patch, which I have committed to
svn, fixes the problem, I hope:


--- pcre-8.13/pcre_compile.c      2011-08-02 11:59:47.000000000 +0100
+++ pcre_compile.c 2011-08-20 14:44:47.000000000 +0100
@@ -2314,6 +2319,7 @@
   {
   if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
     ptr++;
+  else if (*ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;   
   else
     {
     if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)



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