Quote:
Originally Posted by RenniePet
I use calibre to convert my Word docx files to epub, and think it's great.
Now I'd like to try to automate some of the manual editing I do in Word before each conversion, by using the regex Search & replace facility, if possible.
Questions:
What exactly is the regex function being applied to? Is it working on some kind of html, or an internal docx format of the text?
Can the regex function recognize a multi-line target? And if so, replace it with fewer lines? And how?
|
The help text for Search & Replace is :
Quote:
Search and replace uses regular expressions. See the regular expressions tutorial to get started with regular expressions. Also clicking the wizard button below will allow you to test your regular expression against the current input document. When you are happy with an expression, click the Add button to add it to the list of expressions.
|
That would seem to imply it works on the input file - i.e. the DOCX. But I don't know for certain that that is the case. Kovid Goyal will no doubt provide a definitive response.
FWIW, I use a couple of Word Add-ons that have 'advanced' S&R tools:
e-Book Tools - a Word add-in - even though it's no longer under development, it still works for me with the latest Office 365.
Translator Tools – Productivity tools for editing and translation
BR