in reply to Re: Re: Make a string regexp-safe
in thread Make a string regexp-safe
It is exactly equivalent tomy $string = "some unsafe chars"; .... =~ /\Q$string\E/;
See perlre for more info.my $string = "some unsafe chars"; my $temp = quotemeta $string; .... =~ /$temp/;
--
Ilya Martynov
(http://martynov.org/)
|
|---|