Quote:
Originally Posted by mattam
Thanks, dwanthy, but your RegEx only works, if the series information is present. If a book isn't part of a series, it fails.
|
I knew that was the case. That is why I gave you two regex one with series and one without series and suggested you use the
Quick Preferences Plugin to switch between the two as needed. I also have regex for
Author - Series - Title
Code:
^((?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]+)
Title - Series - Author and
Code:
^((?P<title>([^\-_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<author>[^\-_0-9]+)
Series - Tile - Author too
Code:
^((?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)\s*-\s*)?((?P<title>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?(?P<author>[^\-_0-9]+)
in my Quick preferences plugin. It is a simple matter of quickly switching between regex before adding any group of books as needed.