Quote:
Originally Posted by MSWallack
One other quirk that I've noticed is that the RE seems to return unpredictable results if there is a dash or hyphen in the author's name or the book title.
|
spaces and hyphens are used to "find" the breaks between author, title, series and number. The most common separator is "space-hyphen-space." If your author or title has that in it, it will usually break there. OTOH, if it has only a hyphen, but no spaces on either side, it won't break (for many regexes) It all depends on the regex and your specific title. I've seen many regexes that specify titles never have a hyphen. See this:
Code:
(?P<title>([^\-_\[\(]+))
That means the title never has a hyphen. OTOH, this:
Code:
(?P<title>([^_\[\(]+))
permits the hyphen in the title, but that may break other parts of the regex match.