![]() |
#1 |
Enthusiast
![]() 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? |
![]() |
![]() |
![]() |
#2 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Enthusiast
![]() Posts: 40
Karma: 10
Join Date: Jan 2014
Device: Kindle Paperwhite 2
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |