![]() |
#1 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jun 2018
Device: Kindle Oasis
|
![]()
I have a book that pretty much every line has id="page123" in it, with the number counting up every line. They look liked one of these two examples
https://imgur.com/a/WKBWIZs https://imgur.com/a/WKBWIZs I'm trying to change the code these page numbers are in and around, but having each line be completely different is proving above my knowledge. How can I remove these, in the simplest way? I'm terrible with using expressions too, I just cant wrap my head around them. So, if ou're gonna recommend using expressions somehow, I'd be super grateful if you's make it dummy proof |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,055
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I believe this will work MAKE SURE that is all it touches.
(those id don't really hurt other that take up file space, and modern readers have plenty in most cases) Search (regex) Code:
\sid="p\d+" <leave blank> |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jun 2018
Device: Kindle Oasis
|
That gave me an error
SelectorSyntaxError: Expected selector, got <DELIM '=' at 4> |
![]() |
![]() |
![]() |
#4 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,033
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Maybe
id\=\"page[0-9]*\" I think \ means use next character as literal not execute so if I'm in doubt I escape with \ [ ] encloses a list * repeats d does mean any digit, but I've forgotten how to use that. I'm inept at regex so I always click find a few times to make sure before doing Replace All! |
![]() |
![]() |
![]() |
#5 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,055
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
\d digit
+ 1 or more times * 0 or more |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,752
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
But before you remove the IDs, make sure none of them are being used for links.
|
![]() |
![]() |
![]() |
Tags |
html book, page numbers |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Scan and fix the device" after removing a book with Calibre | ownedbycats | Devices | 8 | 01-29-2022 08:20 PM |
Pressing "Restore Defaults" under "Book Details" wipes all "Look & Feel" settings. | MarjaE | Library Management | 1 | 03-30-2021 11:46 AM |
HTML to MOBI. How to create book "start" location? | tehmac | Conversion | 4 | 08-21-2012 08:21 PM |
Changing book titles of epubs (specifically removing "Barnes & Noble Classic Series" | jettrue | Calibre | 3 | 08-03-2010 09:02 AM |