N
neilsolent
Hi
I need to do a pattern match like:
$a =~ /(.*)\/$pattern/;
Trouble is, the variable $pattern contains a string of weird and
wonderful characters like "+" which seem to get treated as special in
the regular expression, so I get an error. Is there some way I can
match using $pattern literally (i.e. ignore the special meaning of any
characters)? Needless to day, $pattern is not predetermined, so I
cannot simpy type out a valid regular expression manually.
many thanks,
Neil
I need to do a pattern match like:
$a =~ /(.*)\/$pattern/;
Trouble is, the variable $pattern contains a string of weird and
wonderful characters like "+" which seem to get treated as special in
the regular expression, so I get an error. Is there some way I can
match using $pattern literally (i.e. ignore the special meaning of any
characters)? Needless to day, $pattern is not predetermined, so I
cannot simpy type out a valid regular expression manually.
many thanks,
Neil