in reply to Re: seeking expression to match "/mysearch/detail/966031"
in thread seeking expression to match "/mysearch/detail/966031"
You must escape / in regexes ...
A literal delimiter character in a regex like /...\/.../ must be escaped, but if the delimiter is within an interpolated string (as in the OPed regex), the regex compiler is quite happy with it:
c:\@Work\Perl>perl -wMstrict -le "my $re = '.../...'; ;; print 'match' if 'xxx/xxx' =~ /$re/; " match
Give a man a fish: <%-{-{-{-<
|
|---|