View Single Post
Old 12-21-2011, 03:29 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,951
Karma: 55705602
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by scissors View Post
I tried that in the following

preprocess_regexps = [
(re.compile(r'\\\'', re.IGNORECASE | re.DOTALL), lambda match: '`')]

I used ` as the replacement because ''' fails.

It didn't work.

Here is an example of text i'm trying to clean up.


Lana is one of 2011\'s biggest success stories. The gorgeous songstress found fame on the internet with her songs \'Video Games\' and \'Blue Jeans\'. Since then she has been everywhere, even singing for the fash pack at the Mulberry pool party in LA. With the soon to be released \'Born To Die\' we will all wonder how we ever coped without her slick vocals. Watch out 2012, Lana is coming!
I just pasted the above into a new Sigil document.
My regex search \\\' found all and a simple ' was the replace

Go Sigil
IMHO fix it outside, it is so easy that way
theducks is online now   Reply With Quote