Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 07-16-2020, 04:07 AM   #1
Doum
Connoisseur
Doum began at the beginning.
 
Posts: 58
Karma: 10
Join Date: Jun 2020
Device: Kobo Aura HD
remplace Littérature <xxx> by Littérature étrangère

Hi
I tried a new rule when a book is add to remplace tag : Littérature <something but not Français*> by Littérature étrangère.


My first idea has been to use : ^(Littérature)/s([a-km-zA-K-MZ].*) for my regex and remplace it by : /1 étrangère.

But that didn't work :/

Can you help me please ?
Doum is offline   Reply With Quote
Old 07-16-2020, 04:48 AM   #2
Doum
Connoisseur
Doum began at the beginning.
 
Posts: 58
Karma: 10
Join Date: Jun 2020
Device: Kobo Aura HD
i found this :
(Littérature) ([^fF].*) replace by \1 étrangère . That's work .
If a tag is "Littérature Allemande" i have now "Littératture étrangère"
Now i search to remove [fF]* , so if a have "Littérature française" i would like only "Littérature"

I think i have to add an another rule ... but perharps it's possible to combine both of them in one regex ?
Doum is offline   Reply With Quote
Advert
Old 07-16-2020, 04:49 AM   #3
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I think you want:

Code:
^(Littérature)\s[a-km-zA-K-MZ].*
That assumes that it is two words separated by a single space. And the replace should be:

Code:
\1 étrangère
But, that doesn't handle any accented characters or numbers. And I'm curious about why the L is omitted. I'd probably do:

Code:
^(Littérature)\s.*
With the same replace. That would cover the word you want followed by anything.

If neither of these work, we'd need to see some actual examples to look at.
davidfor is offline   Reply With Quote
Old 07-17-2020, 03:55 AM   #4
Doum
Connoisseur
Doum began at the beginning.
 
Posts: 58
Karma: 10
Join Date: Jun 2020
Device: Kobo Aura HD
I'ts an error, is not L but F for (Française) that i wanted. ^(Littérature) ([^fF].*) is my final version. Thank's for your help Davidfor
Doum is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does litterature still evolve? Kasper Hviid General Discussions 57 05-01-2015 04:48 AM
Free pulp litterature (1 ebook, 2 audio books) Kasper Hviid Deals and Resources (No Self-Promotion or Affiliate Links) 3 04-14-2015 10:05 PM
History Frédéric le Grand: De la littérature allemande (french); v.1.1. 9 Aug 2014 Karl May ePub Books 0 08-08-2014 12:17 PM
Achat en devise étrangère xavierhiggs Assistance 1 02-28-2011 11:31 AM
You know you are to into litterature when jbcohen Reading Recommendations 6 11-19-2010 01:13 PM


All times are GMT -4. The time now is 04:11 AM.


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