Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: With Unicode, \d is wrong if you mean [0-9]

by TimToady (Parson)
on Oct 27, 2004 at 17:13 UTC ( #403103=note: print w/replies, xml ) Need Help??


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

That could be construed as a bug in Perl's internal grok_number() routine.

Replies are listed 'Best First'.
Re^4: With Unicode, \d is wrong if you mean [0-9]
by hv (Parson) on Oct 28, 2004 at 02:45 UTC

    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.

    Hugo

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://403103]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (None)
    As of 2021-10-17 02:40 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      My first memorable Perl project was:







      Results (71 votes). Check out past polls.

      Notices?