View Single Post
Old 08-06-2013, 05:01 PM   #2
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
This should work:

(?P<author>.+)\s-\s\[(?P<series>.+)\s(?P<series_index>\d+)\]\s-\s(?P<title>.+)\s(\(.+\)\s)+

But I usually just add the whole filename to title, and afterwards use Edit metadata in bulk to do some search and replace to populate the other fields and trim unwanted stuff.. I find that to be much faster and safer than trying to adjust the regexp to read metadata from the filename, when it gets complicated. You can even squirrel away the whole original filename to a custom field for future use.

The author first and last name most likely does not switch due to this regexp. But there is a checkbox in the dialog, where you set the regexp, for switching firstname and lastname. Make sure it is unchecked. Otherwise you could have a tweak active that cause this. Try setting the defaults for all tweaks regarding author and author_sort to see if you can find what the problem is.

http://manual.calibre-ebook.com/customize.html#tweaks

Last edited by Adoby; 08-06-2013 at 05:08 PM.
Adoby is offline   Reply With Quote