Code:
"chapter(\d+)[^\[]+\[\K(\d+)
Here, this EbookMakers' code is working :
Code:
<span class="Footnoteanchor"><a epub:type="noteref" href="chapter65.xhtml#ftn1" id="bodyftn1">[1]</a></span>
<span class="Footnoteanchor"><a epub:type="noteref" href="chapter65.xhtml#ftn1" id="bodyftn1">[2]</a></span>
<span class="Footnoteanchor"><a epub:type="noteref" href="chapter66.xhtml#ftn1" id="bodyftn1">[1]</a></span>
<span class="Footnoteanchor"><a epub:type="noteref" href="chapter66.xhtml#ftn1" id="bodyftn1">[2]</a></span>
<span class="Footnoteanchor"><a epub:type="noteref" href="chapter66.xhtml#ftn1" id="bodyftn1">[3]</a></span>
<span class="Footnoteanchor"><a epub:type="noteref" href="chapter67.xhtml#ftn1" id="bodyftn1">[1]</a></span>
<span class="Footnoteanchor"><a epub:type="noteref" href="chapter67.xhtml#ftn1" id="bodyftn1">[2]</a></span>
<span class="Footnoteanchor"><a epub:type="noteref" href="chapter68.xhtml#ftn1" id="bodyftn1">[1]</a></span>
@Roger64 : you have to execute that R/R in one shot, that is All replace, on current file or all html files for example.
@EbookMakers : thanks for your code.
I learnt at least two things :
1) \K which resets the starting point of the reported match
2) using of a rather simple Regex-function