View Single Post
Old 08-14-2013, 09:03 AM   #4
Man Eating Duck
Addict
Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.
 
Posts: 254
Karma: 69786
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
Quote:
Originally Posted by DiapDealer View Post
Which is why you would include the closing </p> in the match to make sure you only got the all encompassing span.

Code:
(?U)<span class="empty">(.*)</span>\s+</p>
Replace with: \1\n</p>
I should have known that including a regex example, even in a footnote, would be distracting and a bad idea
Quote:
Originally Posted by DiapDealer View Post
I'm not arguing that a true parser wouldn't do a more effective (safer) job. It would. I just don't think it would be a very simple task to provide an end user with a configurable, flexible interface to the parser in order to inform it of their desires (without actually writing code themselves).
This 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.

Last edited by Man Eating Duck; 08-14-2013 at 09:11 AM.
Man Eating Duck is offline   Reply With Quote