2009/10/30 John <john.imrie@vodafoneemail.co.uk>:
> Abigail wrote:
>>
>> I also suggest that the POSIX character classes *never* match code points
>> above 255, regardless of the modifier. In which, one would be able to
>> write
>>
>> /\w[:digit:]/u
>>
>>
>
> I agree with you.
>
> Unfortunately the Unicode consortium maps [:digit:] to \p{IsDidgit}
> This page http://en.wikipedia.org/wiki/Regular_expression on wikipedia
> states [:digit:] maps to [0-9] but also maps to \d.
> http://docs.plt-scheme.org/guide/regexp-chars.html states [:digit:] – ASCII
> digits, same as \d
>
> Here we go again. :-)
>
> What I haven't been able to find is a definitive result as to what [:digit:]
> should match
See the POSIX spec.
cheers,
Yves
--
perl -Mre=debug -e "/just|another|perl|hacker/"
Thread Previous
|
Thread Next