Quote:
Originally Posted by Calibreuser
I have some books named like so
Lauthor, Fauthor - series ##- title.ext
Grant, Maxwell - The Shadow 331 - Mark Of The Shadow(b).txt
My best so far is (?P<author>.+) - (?P<series>.+) - (?P<title>[^_]+)
but now the series index is part of series
what is series index Var. name?
and how do I change title section to drop crap at end like (b)
I can rename as needed in most cases
|
Code:
(?P<author>((?!\s-\s).)+)\s-\s(?:(?P<series>.+)\s(?P<series_index>\d+)\s-\s)?(?P<title>[^(]+)(?:\(.*\))?
This should solve for "author(s) - title" and "author(s) - series # - title" as well as get rid of anything in ()'s at the end of the title.
Quote:
Originally Posted by Calibreuser
can anyone help me author, series, index, and title out of this
Grant, Maxwell - [The Shadow 331] - Mark Of The Shadow(b).txt
|
edit: Just noticed the 2nd example had the series in []'s. If that's the case, here it is slightly modified to support optional []'s around the series.
Code:
(?P<author>((?!\s-\s).)+)\s-\s(?:(?:\[\s*)?(?P<series>.+)\s(?P<series_index>\d+)(?:\s*\])?\s-\s)?(?P<title>[^(]+)(?:\(.*\))?