Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-02-2020, 08:55 AM   #1
occum
Junior Member
occum began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: kindl, android phone and ipad, mainly uing kindle
using regular expressions

I am looking for some advice on using a regular expressions when converting books in Calibre


I want to search for a series of words and identify them if they start with a lowercase letter or if they start with an uppercase letter.


Four example

Changing 'cute' to 'sweet'
and changing 'Cute' to 'Sweet'

Is there a way to specify this as part of a regular expression without having to duplicate each search and replace entry?

Thanks
occum is offline   Reply With Quote
Old 02-02-2020, 10:16 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: 30,914
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
IN CONVERSIONS That seems to be a great way to the document

Maybe in the Editor, where you could Find > Replace-Next or Find (again)

Just some ideas:
You can have a list of words to match
Code:
(word1|word2|word3)
But I don't know how you word calculate the replacement.

(if no one comes up with a better way) Use the Spell checker (in the Editor) ALL WORDS showing:
Find your word on the left, type Your Replacement: Apply that
<repeat for each word>
theducks is offline   Reply With Quote
Advert
Old 02-02-2020, 03:01 PM   #3
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,639
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
There's a Sigil plugin that was originally targeted at cleaning up errors PDF scans, but I have a vague recollection of someone using it to clean-up profanities, which is similar. See ==>> Sigil Plugin Index

BR

Last edited by BetterRed; 02-02-2020 at 03:07 PM.
BetterRed is offline   Reply With Quote
Old 02-02-2020, 04:54 PM   #4
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,171
Karma: 8800000
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by occum View Post
I am looking for some advice on using a regular expressions when converting books in Calibre


I want to search for a series of words and identify them if they start with a lowercase letter or if they start with an uppercase letter.


Four example

Changing 'cute' to 'sweet'
and changing 'Cute' to 'Sweet'

Is there a way to specify this as part of a regular expression without having to duplicate each search and replace entry?

Thanks
From the calibre manual the first is a Tutorial the second is a reference.

All about using regular expressions in calibre

Quick reference for regexp syntax

bernie
gbm is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expressions Help lauralein Library Management 1 11-12-2013 07:05 PM
Regular Expressions help deamonfruba Library Management 2 06-02-2012 02:09 AM
Help with regular expressions MostlyCarbon Library Management 0 02-04-2012 03:00 PM
Help with regular expressions jevonbrady Library Management 6 06-21-2011 10:16 AM
Help with Regular Expressions ghostyjack Workshop 2 01-08-2010 11:04 AM


All times are GMT -4. The time now is 10:49 PM.


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