View Single Post
Old 08-10-2014, 08:34 AM   #31
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,705
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Earlier I mentioned that I was worried that:
Code:
</?a ?([^>]+)?>
might find other tags that started with 'a'--and indeed it does. The addr, abbr, and area tags are probably able to be dismissed, but the <aside> tag is one that I'm sure we're only going to see more and more of. And my regex will include it.

So for the paranoid/pedantic type (like myself), it's probably best to use:
Code:
</?a\b([^>]+)?>
instead (should work in pretty-much all regex flavors).

The \b just matches a "word" boundary so that no other tags that start with 'a' will be caught up in the match.
DiapDealer is offline   Reply With Quote