View Single Post
Old 01-18-2012, 05:24 PM   #5
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: 30,932
Karma: 60358908
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 Capricorn View Post
Thank you for that info.

I had a read through manichean's tutorial. That was very useful. Then I went on to the python docs and got utterly lost. It seems like a complete programming language.
As my purpose is to edit some epub books, and not programming, I decided there had to be a better way. Hence I searched on the internet for a regex generator.

I did find some:

1. regexbuddy and regexmagic from the company Just Great Software

2. expresso from ultrapico

As expresso was free, I decided to go for that one.

Then I built the following regex, using expresso, for find and replace

find: </p>[\s]+<p class="calibre2">
replace: \s

When I executed this in sigil, it would find the string in my codeview file, but it did NOT replace it, when I pushed the single replace arrow. If I pushed the replace all button, it worked, but it put in the string \s instead of a blank space.
If I used a blank space in the replace field, again, it did nothing on single replace, but on replace all button, it executed properly with a blank space.

What am I doing wrong?
Nothing
replace single is broken in 905
theducks is offline   Reply With Quote