Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have another regex question: I have a small and a large text. The small text is just a part of the larger one.
For example:
$text1 = 'A company (IBM) made a profit of $300 in the current year.' +; $text2 = 'Latest profit news: A company (IBM) made a profit of $300 i +n the current year. This is 180% more than in the last year.';
doesn't seem to work ...$text2 =~ s/($text1)/FOO$1BAR/;
Is there any workaround ?
Many thanks for your help !
Dany
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Another (maybe stupid) regex question ...
by !1 (Hermit) on Nov 17, 2003 at 15:09 UTC | |
by Anonymous Monk on Nov 17, 2003 at 15:13 UTC | |
|
Re: Another (maybe stupid) regex question ...
by EvdB (Deacon) on Nov 17, 2003 at 16:54 UTC | |
|
Re: Another (maybe stupid) regex question ...
by Melly (Chaplain) on Nov 17, 2003 at 15:22 UTC | |
by jonadab (Parson) on Nov 18, 2003 at 01:09 UTC | |
by Melly (Chaplain) on Nov 18, 2003 at 12:39 UTC |