View Single Post
Old 01-24-2012, 07:11 AM   #3
kamanza
Zealot
kamanza began at the beginning.
 
Posts: 115
Karma: 10
Join Date: Jan 2011
Device: none
I was annoyed by having to correct manually every time there was a hyphen in the author's name or in the title, so i continued tinkering.
I've figured it a bit more:

code

(?P<author>.*?)( -\s*(?P<series>[^_0-9]*)(?P<series_index>[0-9]*))? -\s*(?P<title>[^_].+) ?

It takes care of cases with or without hyphens in title, series & authors, with or without series.
The remaining problem is that if there is no author, series goes into the author slot.
But that is a rare occurrence, so i consider the problem mainly solved.
kamanza is offline   Reply With Quote