in reply to Re: Regex can't find match
in thread Regex can't find match

OMG toolic, you have saved me so much trouble. Thank you very much. Now to get familiar with quotemeta.

Replies are listed 'Best First'.
Re^3: Regex can't find match
by AnomalousMonk (Archbishop) on Apr 07, 2014 at 20:05 UTC

    Specifically, the  ? quantifier regex metacharacter. See Quantifiers in perlre. Instead of quotemeta, you could also use
        $text=~s/\Q$find\E/$replace/g;