Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 02-07-2024, 02:08 AM   #1
barra52
Junior Member
barra52 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2024
Device: Kindle (early model with firmware version5.6.1.1
Question Help with Find and Replace

I'm having a problem in trying to edit some books etc that retain particular text in the html file that I would like to remove using the find and replace function.

An example is.... (88 of 243)20-2-2006 21:47:27</p>

There are obviously 243 occurrences of this text and rather than replace them one by one is it there a 'wildcard' I could use to find and replace all occurrences? Date and time stay the same for all 243 entries, but the *** of 243 changes every 100-150 lines or so.

I'm very new to html editing and anything other than a fairly simple solution would be beyond my limited capabilities.

Thanks in anticipation.

Last edited by pdurrant; 02-07-2024 at 02:37 AM.
barra52 is offline   Reply With Quote
Old 02-07-2024, 10:43 AM   #2
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,812
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
That appears to be a PDF conversion remnant

REGEX is your buddy. There are tutorials here on MR.


<p class="something">
(88 of 243)20-2-2006 21:47:27</p>
(I added the rest of the paragraph in purple , to avoid possibility's of over cleaning)

Code:
<p class="\w+">\(\d+ of \d+\)\d\d-\d{1,2}-\d{4}\s\d\d\:\d\d:\d\d</p>
You may need to adjust the former purple part based upon what you see. Other adjustments based upon what you see. There is no single REGEX to rule them all. I keep basic patterns (as a template) like above, and adjust (and test), in saved searches.

\d is a digit, + allows multiplies. {#} is an exact quantity of them
\s is whitespace
I 'escaped' symbols to be safe \( \) as they can have meaning in a pattern
theducks is offline   Reply With Quote
Old 02-08-2024, 06:52 AM   #3
barra52
Junior Member
barra52 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2024
Device: Kindle (early model with firmware version5.6.1.1
Thank you. Will see how I go and respond accordingly.
Cheers
barra52 is offline   Reply With Quote
Old 02-08-2024, 05:41 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,498
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I'm going to assume that you will save backup copies before editing the books?
DNSB is offline   Reply With Quote
Old 02-09-2024, 06:53 AM   #5
barra52
Junior Member
barra52 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2024
Device: Kindle (early model with firmware version5.6.1.1
Very good advice! Thanks for that.
barra52 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Find/Replace ? Otter Calibre 2 10-08-2012 08:48 PM
Find Replace unrulyguides Sigil 5 02-17-2012 08:38 PM
Find/Replace Won't Find Rand Brittain Sigil 7 09-24-2011 04:35 AM
Find / replace bremler Sigil 6 12-17-2010 03:26 PM
Using Find/Replace with BD Otter Sony Reader 7 02-28-2009 01:49 PM


All times are GMT -4. The time now is 05:36 AM.


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