Rechenfunktion mit RegEx
Hello friends,
I need your help: I edit with the Sigil editor an epub with about 3000 footnotes.
I must implement these:
Search: (<sup>)(\d+)(</sup>)
Replace <a href="Anm.xhtml#\2+47"><sup id = "n\2+47">[\2+47]</sup></a>
--- The footnote found is intended to be e.g. always add 47! ---
Result: <a href="Anm.xhtml#253"><sup id="n253">[253]</sup></a>
With RegEx, this is not possible, but I am on the net to the option:
Function Mode for Search & Replace in the Editot of the new internal Caliber editor. Here, a RegEx term can be extended by a function using Python.
Since I have never programmed with Python and would not want to learn it at 72 years, I ask you to help me solve my problem.
MfG Andreas
Last edited by calibre-ak-4711; 03-14-2017 at 03:05 PM.
Reason: Google Translate
|