Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^3: Simple regular expression problem

by polypompholyx (Chaplain)
on Oct 03, 2005 at 14:31 UTC ( #496935=note: print w/replies, xml ) Need Help??

in reply to Re^2: Simple regular expression problem
in thread Simple regular expression problem

The OP didn't make it clear whether the string before the number could contain digits. However, it's certainly better to be specific in a regex: if you know (for some value of 'know') something will only contain [A-Za-z], not \w, then the former is probably preferable. On the other hand, [A-Za-z] too often it means "I cannot think of any other letters", and then your script barfs on something perfectly valid, but unexpected, like "Ångström".

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2016-10-22 12:23 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (294 votes). Check out past polls.