View Single Post
Old 09-12-2022, 09:33 AM   #52
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,919
Karma: 55705262
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by mobilis View Post
I am making an ebook from saved and pdfunite'd pdf pages, and there are scads of things like this:

<p class="calibre1">13/72</p>

<p class="calibre1">14/93</p>

I want to remove.

How can I?
REGEX is your buddy ( there are a few REGEX tutorials here are MR. That is how I learned. BTW Calibre use PCRE flavor of REGEX)

Code:
<p class="calibre1">\d+\/\d+</p>
\d+ says 1 or more digits together match
\/ is just an escaped / (might not be needed, but dos not hurt)
'escaped' items remove their special meaning and treat them as they LOOK
I left the rest to only be an 'exact match' to be a trigger.

eg <p class="calibre1">The cup was 3/4 full.</p> would not match.
theducks is offline   Reply With Quote