Quote:
Originally Posted by dwanthny
I know nothing about regex, but I tested his regex with this book:
Alan Jacobson - The 7th Victim.epub
and it filled in the proper title and author. This test says you may be incorrect in what you said above.
|
Yes it does. Sorry. Should have tested it.
It is interesting RE, because my REs
Code:
^(?P<author>((?!\s-\s).)+)\s-\s(?:(?:\[\s*)?(?P<series>.+)\s(?P<series_index>[\d\.]+)(?:\s*\])?\s-\s)?(?P<title>[^(]+)(?:\(.*\))?
OR
(?P<author>[^-]+)(( - | *-- *)[[(]?(?P<series>[^-]+)[[( ]+(?P<series_index>[0-9.]+)?[])]?)?( - | *-- *)(?P<title>.+)
are making series optional much more explicitly.