View Single Post
Old 09-05-2013, 11:14 AM   #20
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,631
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
In a perfect world, Toxaris, your expression would work fine. But oftentimes, spans are nested... which means it could easily replace the wrong closing tag. Consider:
Code:
<span style="font-style: italic;">These words are normal, where <span style="font-size: .75em;">THESE ONES</span> are simulated small-caps.</span>
Your regex wouldn't work correctly there. I believe Dreamweaver's search & replace tool is (at least partly) based on a parsing engine that knows which closing tag goes with what opening tag... and would handle it correctly.

Matt's right. While I probably wouldn't get a lot of use out of such a feature, I can see how many might find a feature like that quite handy. Meaning a feature that would allow you to modify/remove an element having a certain class--a feature based on an engine which was aware of the paired-tag nature of (x)html and could always find the correct closing tag without fail.
DiapDealer is offline   Reply With Quote