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 11-05-2017, 02:57 AM   #1
jpbweb
Junior Member
jpbweb began at the beginning.
 
jpbweb's Avatar
 
Posts: 4
Karma: 10
Join Date: Nov 2017
Device: iPad
Extract Series Number from Title

I have a bunch of eBooks in a Series, and the Series Number is together with the title (usually at the beginning). I'm trying to extract the number and copy it to the Series Number field. I am sure there is an easy way to do so with Search and Replace (I have a number of Search/Replace commands stored and used to good effect).

My problem is that I can edit out all non-numbers from the Title, giving me what I want, but sometimes there are numbers elsewhere in the title (like a Year or something else), that is not filtered out and sticks to what si effectively the series number I need.

A suggestion of syntax would be most welcome. I sifted though te forum, but I found nothing that gets the job done yet.
jpbweb is offline   Reply With Quote
Old 11-05-2017, 03:50 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: 71,545
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Search: ^(\d+).*
Search Field: title
Replace: SeriesName [\1]
Replace Field: series

The ^ in the search marks the start of the line
The () in the search mark a section of the search that's to be used to replace the \1 in the replace field - in this case, \d+, one or more contiguous digits.
the .* is just to eliminate the rest of the line.

Since we're replacing the complete series field, you need to include the series name in the replace field, so use the actual series name instead of SeriesName.
pdurrant is offline   Reply With Quote
Advert
Old 11-05-2017, 04:07 AM   #3
jpbweb
Junior Member
jpbweb began at the beginning.
 
jpbweb's Avatar
 
Posts: 4
Karma: 10
Join Date: Nov 2017
Device: iPad
It worked like a charm.
Thank you so much.
jpbweb is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura Books not listed by title but just "<title> - <number> - <series>" qee4q Kobo Reader 12 05-10-2015 04:37 PM
Want to add the series number to the title of a book kaufman Library Management 3 07-14-2013 11:02 PM
DJVU: Extract number of pages JensW Other formats 1 07-06-2013 01:21 PM
Series Number in Book title (Kindle) cityzen Library Management 7 03-20-2011 12:11 AM
Adding Series and Number to Title. Cerepol Calibre 17 09-01-2010 06:50 PM


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


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