![]() |
#1 |
Member
![]() 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 & 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 & Unwin, 1959).</p> |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,216
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Search for:
Code:
<p class="footnote" id="(.*?)"><b class="calibre4"><a id="(.*?)" href="(.*?)" class="pcalibre calibre9"> Code:
<p class="footnote" id="\1"><b class="calibre4"><a href="\3" id="\2" class="pcalibre calibre9"> |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 17
Karma: 10
Join Date: Dec 2021
Device: Kindle Oasis
|
Thank
Just wanted to say THANKS for the help. Made my Day
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,216
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Glad to help.
![]() |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|