vsespb has asked for the wisdom of the Perl Monks concerning the following question:
Or the only possibility is to use [0-9] instead of \d etc.. ?perl -e 'print 3+6 if "\x{424}" =~ /\w/' 9
My code works with Unicode, but, at the same time, I wan't to be able to do validation/security checks and often (very often!) I need \d to match only 0-9 digits
/a /aa and use re '/a' modifier produce syntax errors on early versions of Perl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Force ASCII regexp for all perls 5.8+
by kcott (Archbishop) on May 16, 2013 at 02:21 UTC | |
by vsespb (Chaplain) on May 16, 2013 at 07:40 UTC | |
|
Re: Force ASCII regexp for all perls 5.8+
by tobyink (Canon) on May 16, 2013 at 09:17 UTC | |
by vsespb (Chaplain) on May 16, 2013 at 10:32 UTC | |
|
Re: Force ASCII regexp for all perls 5.8+
by davido (Cardinal) on May 16, 2013 at 00:14 UTC |