Sorry to point this out, but..
$x = "123456"; if ( $x =~ /\d{5,5}/ ) { print "wrong"; }
Still matches 123456
This will do the trick
$x = "123456"; if ( $x =~ /^\d{5}$/ ) { print "right"; }
In reply to Re: Re: specific numbers of digits
by awkmonk
in thread specific numbers of digits
by emichswimr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |