Quote:
Originally Posted by Starson17
(staggering a bit) ..... try this:
Code:
^((?P<author>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?(\[?(?P<series>[^0-9\-]+) (- )?(?P<series_index>[0-9.]+)\]?\s*-\s*)?(?P<title>[a-zA-Z1-9 ]+)(\(.*\))?$
It will have trouble with titles that have anything other than alphanumerics in the title.
|
Actually, I think I figured out one of the issues with this.
The regex works perfectly with any of this:
Quote:
L. Frank Baum - [Wizard of Oz 02] - The Marvelous Land of Oz.lit
L. Frank Baum - [Wizard of Oz 02] - The Marvelous Land of Oz(lit).lit
L. Frank Baum - Wizard of Oz 02 - The Marvelous Land of Oz(lit).lit
L. Frank Baum - Wizard of Oz 02 - The Marvelous Land of Oz.lit
|
But if somehow THIS makes it's way into the parsing, disaster results:
Quote:
L. Frank Baum - [Wizard of Oz 02] - The Marvelous Land of Oz[lit].lit
|
I think I had some unexpected files which were a bit messed up by using square brackets around the file type near the end rather than round ones. I probably just have to track those down "by hand".