View Single Post
Old 09-05-2013, 12:59 PM   #22
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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Jellby View Post
Instead of . (anything) use [^<>] (anything except < or >), that will miss spans with something inside, but at least it will not catch something wrong, unless the code is wrong to start with.
I use that a good bit myself. It means I have to go back through and maybe manually check the remaining (but decidedly fewer) instances that had tags inside and were skipped the first time through, but you're right... it shouldn't do any damage to already valid code.

It's just that every now and again, it would be nice to be able to 'nuke' a particularly pointless class of span without having to think of all the nested 'gotchas' that may bite you (or cause you to have to design a multi-pass strategy). Just every once in a while, mind you. The rest of the time, I enjoy the mental challenge.
DiapDealer is offline   Reply With Quote