in reply to regex across multiple lines
$/=undef; $_=<DATA>; s/([^\n]*printf.*?printf.*?\n)[^\n]*\n/$1/gs; print; __DATA__ This line has a printf and is multiline This line has printf and is one line This line will not be printed
Based upon the test data provided, this works.
Are we to assume that the multiline is a multiline printf function?,
if so surely the line ends with a ';'?
More information please.
--
Brother Frankus.
¤
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: regex across multiple lines
by mndoci (Scribe) on Jun 29, 2002 at 06:17 UTC |