I know very little regex too, and the one dwanthny uses looks good even to me. Thanks. I tested it a little and it's now added to my Prefs, Add Books, add by filename menu and selected for when needed. I'll test it on various things some more then if all that is ok will change to that in the next revision. The nuances of the differences between it and kacir's and calibre's menu regexs are over my head. I know there must be some differences in what they do, but don't know enough regex to decipher it all:
Code:
mine (and on calibre's default menu at install?):
(?P<author>[^_-]+) -?\s*(?P<series>[^_0-9-]*)(?P<series_index>[0-9]*)\s*-\s*(?P<title>[^_].+) ?
dwanthny's:
^((?P<author>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)\s*-\s*)?(?P<title>[^\-_0-9]+)
kacir's:
^(?P<author>((?!\s-\s).)+)\s-\s(?:(?:\[\s*)?(?P<series>.+)\s(?P<series_index>[\d\.]+)(?:\s*\])?\s-\s)?(?P<title>[^(]+)(?:\(.*\))?
OR
(?P<author>[^-]+)(( - | *-- *)[[(]?(?P<series>[^-]+)[[( ]+(?P<series_index>[0-9.]+)?[])]?)?( - | *-- *)(?P<title>.+)