in reply to A single regex

Add some more testcases to this:

m[^(?=.*[a-zA-Z])[\w]+$] and print "$_ : ok" for qw[ 123 123_ 123_a a_ a_123 abc _ a123]; 123_a : ok a_ : ok a_123 : ok abc : ok a123 : ok

Tweaked: The \d was redundant.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

Replies are listed 'Best First'.