in reply to Re: Substitution inside tags, as 1 line
in thread Substitution inside tags, as 1 line
Nice work!
So would your full answer be:
- To put that in a while loop, and
- Add the <pre> & </pre> tag removal code, like this:
?perl -0 -pe '1 while (s/(<pre>\n(?:[^\n]*<p>\n)*)([^>\n]*)\n(.*?<\/pre +>)/$1$2<p>\n$3/ms);s/<\/?pre>//g' htmlfile
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Substitution inside tags, as 1 line
by Narveson (Chaplain) on Oct 14, 2008 at 14:06 UTC |