perlmonk99 has asked for the wisdom of the Perl Monks concerning the following question:
The goal is find text between "?>" and "<?" and replace with "?> printf('" and "); <?" respectively. In this case, for the above example the output should be:<html> blah <?php xxx ?> blah <?=xxx?> blah <?php yyy blah ?> <body> </html>
Any help with this multi-line regex match is much appreciated.<html> blah '); <?php xxx ?> printf(' blah '); <?=xxx?>printf(' blah ); <?php yyy blah ?> printf(' <body> <html>
20071201 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: multi line pattern match
by wind (Priest) on Nov 28, 2007 at 23:23 UTC | |
by perlmonk99 (Initiate) on Dec 03, 2007 at 21:02 UTC | |
|
Re: multi line pattern match
by jrsimmon (Hermit) on Nov 28, 2007 at 21:21 UTC | |
|
Re: multi line pattern match
by RaduH (Scribe) on Nov 28, 2007 at 21:37 UTC |