in reply to regex trouble
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex trouble
by blackgoat (Acolyte) on Mar 05, 2010 at 06:31 UTC | |
by almut (Canon) on Mar 05, 2010 at 06:43 UTC | |
by blackgoat (Acolyte) on Mar 05, 2010 at 06:50 UTC | |
by amir_e_a (Hermit) on Mar 05, 2010 at 07:11 UTC | |
by blackgoat (Acolyte) on Mar 05, 2010 at 10:32 UTC | |
by amir_e_a (Hermit) on Mar 05, 2010 at 11:03 UTC | |
by blackgoat (Acolyte) on Mar 05, 2010 at 11:18 UTC | |
|