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: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to