I feel kind of silly asking for help on this same issue again. I found more files to import and these 2 pieces of code which both worked at various times in the past are not giving the expected results now. I suspect that Calibre has changed a bit with all the wonderful updates Kovid & team have been adding for us.
Quote:
Originally Posted by user_none
This will work provided there are no numbers in the series name:
Code:
[^_]+_(?P<author>[^_]+)_((?P<series>[^_\d]+)(?P<series_index>\d+)?_)?(?P<title>[^_]+)
|
Quote:
Originally Posted by Starson17
Try this:
Code:
([^_]+ )(?P<author>[A-Za-z]+) ((?P<series>[^_\d]+)(?P<series_index>\d+)? )?(?P<title>[^_]+)
|
My test file names were:
- Genre_AuthorLastName_Title.prc
- Genre_AuthorLastName_Series01_Title.prc
which gave the following results respectively:
- Title = Genre AuthorLastName Title
- Title = Genre AuthorLastName Series01 Title