View Single Post
Old 09-08-2012, 05:18 PM   #4
JustForFun
Enthusiast
JustForFun has learned how to read e-booksJustForFun has learned how to read e-booksJustForFun has learned how to read e-booksJustForFun has learned how to read e-booksJustForFun has learned how to read e-booksJustForFun has learned how to read e-booksJustForFun has learned how to read e-books
 
Posts: 30
Karma: 752
Join Date: Nov 2010
Device: PB360
The '?' after the '-' look a little bit suspicious to me and may be responsible. If your books file names are all in the format

Book Series - 01 - Book Title - Book Author.epub

try this:

Code:
(?P<series>[^_-]+) -\s*(?P<series_index>[0-9]+) -\s*(?P<title>[^_-]+) -\s*(?P<author>[^_].+) ?
This will only work for the above mentioned pattern. If you have books without series or with series but without series number or any other combination it will not work.

As an interesting note, in my older calibre version (0.8.55), your original regex did extract the book title correctly in the test.
JustForFun is offline   Reply With Quote