I recently redone the template of my web site and I have these hugs articles that have 30+ replacements I'd have to do to each of them. It'd take 10-15 hours to do it manually.
I want to write a small perl script to substitute this chunk of HTML
With<blockquote> <DIV class=code_box> <DIV class=code_box_header><font size="2" face="Verd +ana, Arial, Helvetica, sans-serif">code</font></DIV> <font size="2" face="Verdana, Arial, Helvetica, sans +-serif">all other text and stuff goes here</font></DIV> </blockquote>
The thing is, I need to capture the stuff inside the 2nd font tag and apply the above blockquote and pclass to it.<BLOCKQUOTE> <p class="style2">all other text and stuff goes here</p> </BLOCKQUOTE>
I can open up my 300+ html files and slurp them up just fine but my regex skills aren't that good to match these multilines while capturing only the text/code in the second font tag (there will always be just 2 if it matches).
In reply to huge multiline regex by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |