[pcre-dev] [Bug 2153] Compile error for pattern [[:ascii:]-]

Top Page

Reply to this message
Author: admin
To: pcre-dev
Subject: [pcre-dev] [Bug 2153] Compile error for pattern [[:ascii:]-]

Philip Hazel <ph10@???> changed:

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

--- Comment #2 from Philip Hazel <ph10@???> ---
A closer look at Perl shows that it warns for [[:ascii:]-X] but not if the
hyphen is the last character in the class, as in your example. I had not
noticed this subtlety. I have just committed a patch (in time to make it into
10.30) that allows a hyphen as the last character in the class, whatever
precedes it. This makes "put a hyphen as the first or last character" always

While doing this I discovered a different bug: PCRE2 was not giving an error
for [\d-X] whereas Perl gives a warning. I have changed this so that \d and
[:digit:] behaviour is the same.

Thank you for raising this issue.

You are receiving this mail because:
You are on the CC list for the bug.