View Single Post
Old 08-08-2014, 04:29 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Did you give my code a try? It should nuke <a href="link-location">content</a> pairs -- all of them -- while preserving any markup on the "content". If you need to fine-tune it any more, the important bit is the bit in multiple layers of parentheses. It uses the power of negative lookbehinds to match-any-string but ones that include the excluded stuff in red.


Nuke tag sets while preserving nested instances and other markup:
Code:
<tag-to-nuke(?: optional-attribute(s)="[^<>]*")?>((?:(?!<(?:tag-to-nuke|/tag-to-nuke)).)*)</tag-to-nuke>
Replace:
Code:
\1

Last edited by eschwartz; 08-08-2014 at 04:31 PM.
eschwartz is offline   Reply With Quote