redbeard has asked for the wisdom of the Perl Monks concerning the following question:
I would like to replace all of this with something else under certain conditions. Seems simple. However, the following<!-- MEMBERSHIPS --> . a bunch of stuff . <!-- BANQUET -->
where $paidstring is what I want to replace it with, seems not to work. Furthermore, I did some playing around, and found that both$template=~s/<!-- MEMBERSHIPS -->(.*?)<!-- BANQUET -->/$paidstring/i;
will match just fine, but putting everything together shows no match. What is going on here? Is there something I am missing in attempting to search and replace text between two html comments?/<!-- MEMBERSHIPS -->(.*?)/ and /(.*?)<!-- BANQUET -->/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Replacing text between two html comments
by mojotoad (Monsignor) on Jul 28, 2010 at 01:59 UTC | |
|
Re: Replacing text between two html comments
by wfsp (Abbot) on Jul 28, 2010 at 07:08 UTC | |
by metaperl (Curate) on Jul 29, 2010 at 15:20 UTC | |
|
Re: Replacing text between two html comments
by StommePoes (Scribe) on Jul 29, 2010 at 07:03 UTC |