in reply to Re: Unrecognized escape \Q passed through in regex
in thread Unrecognized escape \Q passed through in regex
Ok,I'll go with something along the lines of the second solution...
I know the meaning of the switches... They are there because some regexen on DB are allowed to be "real regexes" and not just "bare words".
Maybe I'll emulate \Q...\E then...
update: /e ==> /eg
I know the meaning of the switches... They are there because some regexen on DB are allowed to be "real regexes" and not just "bare words".
Maybe I'll emulate \Q...\E then...
Should that do what I want ? :-)$regexp =~ s/\\Q(.*?)\\E/quotemeta($1)/eg;
update: /e ==> /eg
--
6x9=42
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Unrecognized escape \Q passed through in regex
by ikegami (Patriarch) on Jan 26, 2006 at 18:52 UTC | |
by Articuno (Beadle) on Jan 26, 2006 at 19:13 UTC | |
by ikegami (Patriarch) on Jan 26, 2006 at 19:31 UTC | |
by Articuno (Beadle) on Jan 26, 2006 at 19:57 UTC |
In Section
Seekers of Perl Wisdom