I thought that I was making good progress, but now I'm stumped. Some of my files don't have a series. For example:
King, Stephen - Under the Dome.epub
Here is the RE:
^(?P<author>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b)(\s*-\s*)?(?P<title>([^\-_\[\(]+)) ((\[(?P<series>[^0-9\-]+) (- )?\#?(?P<series_index>[0-9.]+)\]))?
When I test that RE on that filename in Calibre, I get the following results:
Title: Under the
Author: _Stephen King [I've used an underscore to indicate a space that Calibre is putting bofore the author's name]
I can't quite figure out where the RE is breaking.
Thanks again for the help.
|