$text2 =~ s/(\Q$text1\E)/FOO$1BAR/;
perldoc perlre for more information. I hope this helps you with your problem.
In reply to Re: Another (maybe stupid) regex question ...
by !1
in thread Another (maybe stupid) regex question ...
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |