in reply to Re: With Unicode, \d is wrong if you mean [0-9]
in thread Regex help

Hmm, if you want to add one to it, it probably wants to consist of [0-9]+ rather than \d+.


Replies are listed 'Best First'.
Re^3: With Unicode, \d is wrong if you mean [0-9]
by TimToady (Parson) on Oct 27, 2004 at 17:13 UTC
    That could be construed as a bug in Perl's internal grok_number() routine.

      Patches welcome. :)

      If anything, I think I'd rather see things like grok_number() become hooks so you can intercept them, whether to augment, replace, or just add:

      warn "Hey, scare's over now, you can go back to 2 digits" if $num =~ /^20\d\d\z/;

      Of course we probably don't reach grok_number() unless the lexer has already spotted a digit, so we'd need hot-pluggable grammars as well.