Thread: Help with REGX
View Single Post
Old 12-05-2021, 10:26 PM   #1
Upamanyu Santra
Member
Upamanyu Santra began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Dec 2021
Device: Kindle Oasis
Help with REGX

I'm a complete newbie to REGEX but have been using calibre for quite a while.
I have quite a few epubs with a specific sort of formatting that I would like to change. For instance -

<p class="footnote" id="ORI0000972"><b class="calibre4"><a id="introductionfn2" href="part0008.html#introductionft_2" class="pcalibre calibre9">2</a>.</b> K. M. Panikkar, <i class="calibre3">Asia and Western Dominance</i> (London: George Allen &amp; Unwin, 1959).</p>

What I want to do is simple change the position of the id="introductionfn2"
with href="part0008.html#introductionft_2". I want to place href="part0008.html#introductionft_2" then id="introductionfn2"

Result will look something like this
<p class="footnote" id="ORI0000972"><b class="calibre4"><a href="part0008.html#introductionft_2" id="introductionfn2" class="pcalibre calibre9">2</a>.</b> K. M. Panikkar, <i class="calibre3">Asia and Western Dominance</i> (London: George Allen &amp; Unwin, 1959).</p>
Upamanyu Santra is offline   Reply With Quote