Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-16-2026, 04:12 PM   #1
Droewyn
Junior Member
Droewyn began at the beginning.
 
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.
Droewyn is offline   Reply With Quote
Old 03-16-2026, 04:27 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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+
which should capture 1 or more digits in a row.
KevinH is offline   Reply With Quote
Advert
Old 03-16-2026, 04:27 PM   #3
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
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>
or if you'd like to be a little more careful, maybe:

Code:
<span epub:type="pagebreak" id="page_(\d{1,3})" title="(\d{1,3})" class="calibre"> </span>
The first one would grab any span that starts with epub:type="pagebreak", the second additionally drills it down to wildcards on that incrementing page number. \d{1,3} finds any number of 1–3 digits in those slots.

Last edited by phillipgessert; 03-16-2026 at 05:09 PM.
phillipgessert is offline   Reply With Quote
Old 03-16-2026, 05:28 PM   #4
Droewyn
Junior Member
Droewyn began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2016
Device: Kobo Libra Color
Oh, thank you both!
Droewyn is offline   Reply With Quote
Reply

Tags
find/replace


Forum Jump

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


All times are GMT -4. The time now is 08:55 AM.


MobileRead.com is a privately owned, operated and funded community.