Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Does anyone have any suggestions?
Yes. In your application, split your string up into parts you want quoted and parts you don't. Then use quotemeta to quote the parts you want quoted. Then put the strings back together again. You haven't said what your criteria is for deciding whether or not to quote a given part of a string is, so I can't give you specific code to split the string up, but the general idea is, don't try to bypass security features like quotemeta by finding "loopholes". If there are loopholes, there are bugs; and you hope there *aren't* bugs, right? Instead, only apply a feature if you really want it in the first place... In reply to Re: Escaping quotemeta() in regex
by Anonymous Monk
|
|