View Single Post
Old 10-21-2010, 11:18 PM   #3
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,898
Karma: 55267620
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 Pat Nickholds View Post
I am cleaning up the formatting of a number of EPUB books converted from PDF by CALIBRE.

I am using the REPLACE via CODE VIEW and find it extremely powerful...eg
FIND WHAT: a</p> <p class="calibre4">
REPLACE WITH: a <space>
..will neaten everything up.

However I need to go thru the alphabet (and coma, semi colon, etc) to get the formatting complete - very time consuming.

In a attempt to automate the process somewhat I am now experimenting with REGULAR EXPRESSIONS and have managed to work out the SEARCH or FIND WHAT: [a-z]</p> <p class="calibre4">
but I am struggling with the REPLACE WITH: statement.

Can anyone help?
Just did this
Code:
Find:  ([a-z])</p> <p class="calibre4">
note the paren pair
whatever matches the ontents will be passed
In you first example, it would put a lowercase a followed by a space
so your
Code:
replace: \1a space here
theducks is offline   Reply With Quote