I expect the string "1" to match the following regex but it doesn't.
my $str = "1"; if ($str =~ m/-?\p{Nd}/){ print "Matches\n"; else { print "Doesn't match\n"; }
I am using Perl v5.10.0
In reply to Simple regex should match number by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |