View Single Post
Old 04-19-2010, 10:40 AM   #22
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by MSWallack View Post
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.
Starson17 is offline   Reply With Quote