View Single Post
Old 03-13-2017, 01:36 PM   #1
calibre-ak-4711
Junior Member
calibre-ak-4711 knows what time it iscalibre-ak-4711 knows what time it iscalibre-ak-4711 knows what time it iscalibre-ak-4711 knows what time it iscalibre-ak-4711 knows what time it iscalibre-ak-4711 knows what time it iscalibre-ak-4711 knows what time it iscalibre-ak-4711 knows what time it iscalibre-ak-4711 knows what time it iscalibre-ak-4711 knows what time it iscalibre-ak-4711 knows what time it is
 
Posts: 6
Karma: 2480
Join Date: May 2015
Device: none
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
calibre-ak-4711 is offline   Reply With Quote