You may want to make the regex somewhat shorter:perl -e 'my $x=q|v09.11-e020|;$x =~ m/^v[0-9][0-9]\.[0-9][0-9]-[a-z][ +0-9][0-9][0-9]/ and print " match\n"' #Prints ' match'
m/^v\d{2}\.\d{2}-[a-z]\d{3}/
Theory is when you know something, but it doesn't work.
Practice is when
something works, but you don't know why it works.
Programmers combine Theory
and Practice: Nothing works and they don't know why.
-Anonymous
In reply to Re: regex trouble
by NetWallah
in thread regex trouble
by blackgoat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |