When you are matching against something in $_, you don't have to say $_ =~ /.../ but can just use /.../ as the match will be against $_ by default.
You don't have to put square brackets around the \d as it is already a character class denoting digits.
Cheers,
JohnGG
In reply to Re: Regex condition
by johngg
in thread Regex condition
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |