in reply to How to escape metacharacters without backslash it in regex?
Why? Why? Why?
First, a little bit of explanation as to why you need to do this (and "because I want to" is not a good reason). Second, have you read the Perl Regular Expressions and Perl Regular Expressions Tutorial? If not, please do so.
I suspect that what you need to do is either use \Q and \E or quotemeta. If those don't do the trick, post an explanation of why they don't fit your requirements, and the code and data that are giving you trouble.
|
|---|