|
|
#1 |
|
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Mar 2016
Device: Kobo Libra Color
|
Can wildcards be used in Find/Replace?
I had converted an Amazon book to a epub in Calibre after switching from Kindle to Kobo. I no longer have my Kindle -- the reason I switched was because my old Oasis was physically smashed -- and can no longer download my purchased books.
I noticed that there were a large number of smushed-together words in the converted file, so I popped it into Sigil with the intention of fixing it. Here's the problem. All the instances of smushed words are due to the following: <span epub:type="pagebreak" id="page_33" title="33" class="calibre"></span> I can do a find/replace, but each instance increments the number in the HTML by one. There are 420 of these stupid things in total. Is there a way I can use a wildcard in find/replace to knock all of these out at once? I'd rather not have to spend all afternoon incrementing numbers to fix my epub. |
|
|
|
|
|
#2 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,524
Karma: 6734148
Join Date: Nov 2009
Device: many
|
Yes, this is covered in the regex chapters in the Sigil User Guide.
These are page break marks. You kight want to keep them and add a space after each to prevent smushed words. In Find and Replace, you want to enable Regex mode and use a wildcard specific to digits. Simple way to do that is to use the string: Code:
\d+ |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 332
Karma: 3200122
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
|
You can do it via regex. If you're feeling brave, you can go with:
Code:
<span epub:type="pagebreak".*?/span> Code:
<span epub:type="pagebreak" id="page_(\d{1,3})" title="(\d{1,3})" class="calibre"> </span>
Last edited by phillipgessert; 03-16-2026 at 05:09 PM. |
|
|
|
|
|
#4 |
|
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Mar 2016
Device: Kobo Libra Color
|
Oh, thank you both!
|
|
|
|
![]() |
| Tags |
| find/replace |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to find using wildcards? | lockheed | Editor | 4 | 01-08-2015 11:32 PM |
| Sigil Wildcards/Regex Find/Replace | Adman35 | Sigil | 7 | 08-16-2014 01:02 PM |
| wildcards in search-replace sigil 0.4905? | Capricorn | Sigil | 13 | 01-19-2012 08:22 PM |
| Find/Replace Won't Find | Rand Brittain | Sigil | 7 | 09-24-2011 04:35 AM |
| Search & Replace "wildcards"? | LoveMyKobo | Calibre | 3 | 05-26-2011 06:12 PM |