in reply to
A single regex
With the limit of zero or one underscore, it becomes a case where I'd prefer two separate conditions -- it just seems easier (and is probably faster):
( tr/_/_/ <= 1 and /^\w*[A-Za-z]\w*$/ )
[download]
Comment on
Re: A single regex
Download
Code
In Section
Seekers of Perl Wisdom