Hello, I want to match:
/path/
/path/123
/path/abc
but /path/?xxx should not be matched.
This works:
$ perl -le '$x="/path/abc"; print 1 if $x=~m{path/\w+}'
1
this works too:
$ perl -le '$x="/path/?abc"; print 1 if $x=~m{path/\w+}'
But it doesn't work for this case:
$ perl -le '$x="/path/"; print 1 if $x=~m{path/\w+}'
it expects 1 returned.
Can you help? thanks.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
