![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: regexp questionby hawson (Monk) |
on Feb 12, 2002 at 02:04 UTC ( #144759=note: print w/replies, xml ) | Need Help?? |
Try this pattern: /^$path(?=(\/[\S\/]*|$))/ It says, more or less: match the contents of $path, but only if followed by a slash (and optionally more slashes and non-space characters), or the end of the line. Here's my test program
In Section
Seekers of Perl Wisdom
|
|