Calibre problem with 'REPLACE WITH' RegExp
Hello and thanks to everyone,
I am quite new to Calibre and I am trying to use it's ebook converter (last version of Calibre) to operate a string Search and Replace inside an epub ebook's text during the conversion process.
I carefully read the Calibre RegExp tutorial as well as several other articles I googled for, and played around with it for a whole couple of hours, but I still could not figure out how to reach my goal.
Let me explain, using an example, which is the problem I am facing:
Let we say I need to find and remove, inside the book's text, all the occurrences of the hyphen (-) character which are included between two alphabetical characters.
I.E the expression 'preg-nancy' should be converted into the correct word 'pregnancy'.
For this reason, according to the Calibre manual, I put, inside the SEARCH EXPRESSION field, the following Regular Expression:
[A-Za-z]-[A-Za-z]
The processor correctly finds what I mean and, jumping back to the above example, it selects the portion 'g-n' inside the word 'preg-nancy' (and all the other words with the hyphen inside).
Now, I really cannot understand which RegExP I have to put into the REPLACE WITH field to let the processor to just remove the hyphen (-) character between the two alphabetical ones, while leaving all the other character inside the word untouched, thus transforming the word 'preg-nancy' into the correct word 'pregnancy'.
I tried many combinations, but I really cannot find the correct solution.
Any help would be highly appreciated.
Thanks in advance.
Dave
|