[pcre-dev] 8.34-RC1: \s is locale dependent whereas [\s] is …

Top Page
Delete this message
Author: Ralf Junker
Date:  
To: pcre-dev
Old-Topics: [pcre-dev] 8.34-RC1 release candidate available for testing
Subject: [pcre-dev] 8.34-RC1: \s is locale dependent whereas [\s] is not
PCRE 8.3.4-RC1.

The two patterns below do not match identically. [\s] always matches VT
but \s only if the current locale defines VT as space.

/[\s]+/
     > \x09\x0a\x0c\x0d\x0b<


/\s+/
     > \x09\x0a\x0c\x0d\x0b<


I believe that according to SVN 1363, ChangeLog entry 18, \s should
always match VT even if the current locale does not define it as such.

Ralf