Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: pattern matching

by Porculus (Hermit)
on Apr 10, 2009 at 13:15 UTC ( [id://756810]=note: print w/replies, xml ) Need Help??


in reply to Re^2: pattern matching
in thread pattern matching

Premature generalisation is the root of much evil.

In practice, since the OP did not mention any character-set complications, it is a reasonable assumption that the task in question does not require matching non-ASCII capital letters or require excluding non-ASCII numerals. So there is no need to worry about Unicode ranges, and distinguishing between \d and [0-9] is splitting hairs.

Replies are listed 'Best First'.
Re^4: pattern matching
by JavaFan (Canon) on Apr 10, 2009 at 13:49 UTC
    In this age and time, and the fact that Perl has escaped outside of the US border, not assuming someone means "ASCII" when talking about letters or digits isn't "premature generalisation". It's not that [A-Z] is such a savings on keystrokes over \p{Lu}.

    At least you could have mentioned your odd choice (assuming you actually thought about any "character-set complications").

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-03-29 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found