Thread: Regex examples
View Single Post
Old 02-22-2012, 11:57 PM   #22
Serpentine
Evangelist
Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
A few people have asked me for a nice way to change CSS class formatting for simple print types into their relevant basic tags, I often use something like this :
Code:
Find: (?si)<span[^<>]+(?:class="(?:(i)talics?|(b)old|(u)nderlined?|(s)trikeout)")[^<>]*>(.+?)</span>
Replace: <\1\2\3\4>\5</\1\2\3\4>
It will likely hate nesting, and it's messy since you cant use duplicate names (which would mean no spammed \1\2\3\4.)
Serpentine is offline   Reply With Quote