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 03-17-2016, 09:03 AM   #1
unabatedshagie
Enthusiast
unabatedshagie began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Jan 2014
Device: Kindle Paperwhite 2
Is this possible using a regular expression?

I've currently got a search/replace filter which searches on the series_index and renames the title of the book prepending the series number.

My search for is: ^(\d{1,2}).0$
My replace with is: #0\1 |

Now the replace works fine if the series has < 10 books but if it's got > 10 I need to run the replace in two passes remembering to remove the 0 from the replace with field if the series_index is 10 or more.

Is it possible to create something which will manage to do the replace properly in one pass assuming the series_index is < 100?
unabatedshagie is offline   Reply With Quote
Old 03-17-2016, 09:29 AM   #2
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 73,787
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
There might be a way to do what you want, but might I suggest that you don't want to do that?

Much better to use the plugboard facility and only get the series number (& perhaps name) added to the book title when sending the book to your device. See this thread.
pdurrant is offline   Reply With Quote
Advert
Old 03-17-2016, 09:47 AM   #3
unabatedshagie
Enthusiast
unabatedshagie began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Jan 2014
Device: Kindle Paperwhite 2
Quote:
Originally Posted by pdurrant View Post
There might be a way to do what you want, but might I suggest that you don't want to do that?

Much better to use the plugboard facility and only get the series number (& perhaps name) added to the book title when sending the book to your device. See this thread.
Thanks, I'll have a look at that.
unabatedshagie is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
More than 3 regular expression? james968 Conversion 1 04-04-2012 05:39 AM
Regular Expression Help iKarampa Calibre 13 12-15-2010 07:17 AM
Regular expression help krendk Calibre 4 12-04-2010 04:32 PM
Regular Expression Help smartmart Calibre 5 10-17-2010 05:19 AM
Help with the regular expression Dysonco Calibre 9 03-22-2010 10:45 PM


All times are GMT -4. The time now is 11:33 PM.


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