texuser74 has asked for the wisdom of the Perl Monks concerning the following question:
This is my present script:
and the output is:while(<DATA>) { s!<a>(.*?),(.*?)</a>!<a>$1A$2</a>!g; s!<b>(.*?),(.*?)</b>!<b>$1B$2</b>!g; print; } __DATA__ This is to test. <a>a, b</a> <b>a,b</b>
Here the present scripts works only within ... since there is no line breaks in between them.This is to test. <a>a, b</a> <b>aBb</b>
How to find the text with in a text range containing line breaks?
please advise, Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: trying to do a simple search
by ikegami (Patriarch) on Jan 22, 2009 at 06:22 UTC | |
|
Re: trying to do a simple search
by davido (Cardinal) on Jan 22, 2009 at 06:55 UTC | |
by texuser74 (Monk) on Jan 22, 2009 at 07:04 UTC | |
by davido (Cardinal) on Jan 22, 2009 at 07:19 UTC | |
by ig (Vicar) on Jan 22, 2009 at 17:52 UTC | |
by texuser74 (Monk) on Jan 29, 2009 at 03:50 UTC |