fork download
  1. import re
  2.  
  3. data = """<tr><td class="newscap"><b style="font-size:13px">Downtime for Christmas</b>
  4. <br><small>by <script language="javascript">document.write('<a class=\"cap\" href=\"mailto:'+rot(5,'mvoogz@vrvmzizorjmf.jmb')+'\">'+rot(5,'mvoogz@vrvmzizorjmf.jmb')+'</a>')</script><noscript>rattle</noscript> on 12/30/12 10:48</small></td></tr>
  5. <tr><td class="aware" colspan="2">
  6. So, it appears the site was down for christmas. I could try to find out why, but I don't care enough. Went to <a href="https://e...content-available-to-author-only...c.de/congress/2012/wiki/Main_Page">29c3</a>, didn't get much done, ate a lot of fast food. I'm old, fat, and boring now. However, I found out about <a href="http://w...content-available-to-author-only...c.org/tanja/newelliptic/newelliptic.html">Edwards curves</a>, that shit is rad.
  7. </td></tr>"""
  8.  
  9. print re.sub(r'.*(<script.*>)(.*)(</script>).*', r"\n\n---\1\n---\2\n---\3", data)
Success #stdin #stdout 0.09s 10864KB
stdin
Standard input is empty
stdout
<tr><td class="newscap"><b style="font-size:13px">Downtime for Christmas</b>


---<script language="javascript">document.write('<a class="cap" href="mailto:'+rot(5,'mvoogz@vrvmzizorjmf.jmb')+'">'+rot(5,'mvoogz@vrvmzizorjmf.jmb')+'</a>
---')
---</script>
		<tr><td class="aware" colspan="2">
		So, it appears the site was down for christmas. I could try to find out why, but I don't care enough. Went to <a href="https://e...content-available-to-author-only...c.de/congress/2012/wiki/Main_Page">29c3</a>, didn't get much done, ate a lot of fast food. I'm old, fat, and boring now. However, I found out about <a href="http://w...content-available-to-author-only...c.org/tanja/newelliptic/newelliptic.html">Edwards curves</a>, that shit is rad.
		</td></tr>