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

Page principale
Supprimer ce message
Auteur: Ralf Junker
Date:  
À: pcre-dev
Anciens-sujets: [pcre-dev] 8.34-RC1 release candidate available for testing
Sujet: [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