if ($mypath =~ m{(?:^|/)mydirectory/dirOne/pagehere\.cgi$}) { print "results here"; } if ($mypath =~ m{(?:^|/)mydirectory/dirOne/[^/]+\.cgi$}) { print "results here"; }
(?:^|/)mydirectory
makes sure we don't match
notmydirectory
[^/]+
means "one or more of (not a slash)".
In reply to Re: Finding all pages in a path
by ikegami
in thread Finding all pages in a path
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |