in reply to Problems with matching and metacharacters
Simply put \Q and \E around $input. Like so:
m/(\Q$input\E)/
Don't do this:
m/\Q($input)\E/
Because the regex will also try to match the parenthesis.
Sarah
Update: I never said I was fast.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Problems with matching and metacharacters
by Anonymous Monk on Jun 14, 2001 at 19:55 UTC | |
by WebHick (Scribe) on Jun 14, 2001 at 20:35 UTC |