This is what I use, I asked around some unix forums to get the answer. I use the same dataformat. My regex does not, however, take the series number.
(?P<author>((?!\s-\s).)*)\s-(?:\s(?P<series>((?!\s-s).)*)\s-)?\s(?P<title>.*)
EDIT: I just took the regex from the link, and while it wouldn't work as is, after removing the last "?", it worked with all my books.
(?P<author>[^_-]+) -?\s*(?P<series>[^_0-9-]*)(?P<series_index>[0-9]*)\s*-\s*(?P<title>[^_].+)
The only think I'd like tho change in that regex would be to make there have to be a space before and after a "-" to use it as a delimiter.
Time to reimport my Library! Now, if only .6 was out so I could convert it into epub with perfection!
Last edited by darkmonk; 05-26-2009 at 03:45 PM.
|