in reply to Another (maybe stupid) regex question ...

$text2 =~ s/(\Q$text1\E)/FOO$1BAR/;

perldoc perlre for more information. I hope this helps you with your problem.

Replies are listed 'Best First'.
Re: Re: Another (maybe stupid) regex question ...
by Anonymous Monk on Nov 17, 2003 at 15:13 UTC
    OMG, not again :-) Damn i really should read this great doc a bit more ... That's the second time today i could have found the answer in 'perlre'.

    But hey, thanks a lot !