View Single Post
Old 11-22-2017, 11:21 AM   #2
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,818
Karma: 54830978
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 reinsley View Post
Hi,

In the Calibre editor, I am looking for a kind of conditionnal "search and replace". The first step is a search only about the colon ( : ) punctuation mark.

Some texts are not correct.
For example "word: word".
It should be "word : word".
To say it another way the colon should have a space on each side. "wordspace:spaceword"

How can I search for "anyword:" ( a word without space and colon) into the text part only ? If I can avoid the HTML tags and markers...

I saw a tricky method following Python rules but it's out of my competence field.
I'd like to do it with the main GUI's Search and Replace boxes.

TIA for your help.

Best regards
I think this will work in general (will find stuff outside the <body> so no Replace All reccomended

Code:
\>.+?\w\:\w
theducks is offline   Reply With Quote