View Single Post
Old 08-14-2013, 09:20 AM   #6
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 Man Eating Duck View Post
I should have known that including a regex example, even in a footnote, would be distracting and a bad idea
Sorry, I couldn't resist.
Especially considering your use of the phrase "an intuitive regex." I just found it amusing that the solution to the problem you presented was one that was very intuitive for me.
Quote:
Originally Posted by Man Eating Duck View Post
IThis is not only an attempt to avoid HTML/Regex madness, but to semi-automate a set of tasks I find myself doing manually over and over again. It might also be helpful for the people creating the epubs in the first place
Understood. I hope you get your wish -- as long as it doesn't break something else I rely on.

Quote:
Originally Posted by theducks View Post
If you run the cleanup above, you end with broken first and last spans
Yep. You'd have to run two or three passes to clean that up:
Code:
<span>([^>]*?)</span>
followed by
Code:
<span class="normal">([^>].*?)</span>
Both replaced with \1
Provided the spans were being applied consistently, of course.

Sorry ... last hijack. I promise.

Last edited by DiapDealer; 08-14-2013 at 09:43 AM.
DiapDealer is offline   Reply With Quote