Quote:
Originally Posted by mattam
Thanks for the effort, louwin, but it didn't work.
I tried it on several examples, like the one above or "Pilgrimage - Zenna Henderson - People 1.mobi" and "Holding Wonder - Zenna Henderson.mobi". It didn't work.
I had previously tried playing with parentheses, question marks, etc., but to no avail. 
|
The following work for your examples. I didn't write them so don't ask me to explain them.
For
Title - Author - Series I use this regex
Code:
^((?P<title>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<author>[^\-_0-9]+)\s*-\s*)?(?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)
For
Title - Author I use this regex
Code:
(?P<title>.+) - (?P<author>[^_]+)
I use the Quick Preferences plugin to quickly switch between them as needed.
I currently have 5 different regex I switch between as needed.