ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: HTML Garbage Tag Removal

<< < (2/2)

pulphero:
Well,

I tried (with) a trial version of Sublime Text (v3 build 3126 x64), and I cooked this regex to remove the extra span tags:

--- ---Find What: (?m)<span\sclass="no-break">(.*?)<\/span>(.*?)
Replace With: \1\2
Be sure to enable the Regular expression option (Alt-R from the Replace screen). Switching on Wrap is required too.
-Ath (June 03, 2017, 10:40 AM)
--- End quote ---

Wow! It works perfectly. Thanks so much for doing this.

Ath:
And on special request, replacing <span class="i">one</span> by <i>one</i> you could use this replacement:

--- ---Find What: (?m)<span\sclass="i">(.*?)<\/span>
Replace With: <i>\1</i>
The disadvantage here is that after this replacement you won't be able to use css for changing all your global emphasized text into emphasized (or a whole different font or whatever) by a single css modification anymore. But I'm not sure that would be useful for an ebook ;)

skwire:
Nice work, Ath.  I'm going to mark this as done.  Cheers.

Navigation

[0] Message Index

[*] Previous page

Go to full version