On Tue, Mar 29, 2011 at 11:03 PM, Jim Gibson <jimsgib...@gmail.com> wrote:
>
> The statement "To match the ASCII digit characters you must use [0-9]" is
> wrong. I believe you meant to say "To match the ASCII digit characters and
> only those characters, you must use [0-9]".


Or \p{PosixDigit}; Teach new people Unicode character properties! They'll
hate/love you forever. Or (?a:\d) if they are running blead or some of the
latest releases in the 5.13 series!

Sorry, that "you must use" got a bit under my nails ; ) That aside though, I
agree with most of what you say. Warning beginners of the pitfalls of \d and
friends, however, is the way to go: I live in a country where ASCII doesn't
make up the entire character set, but everyone in my office seems to think
that it does. I constantly wish someone would've taught them better whenever
they started programming*.

Brian.

*(it's a Ruby job though, which makes things even more painful)

Reply via email to