A token to match quadrinomial.s Matches: Foo Foo (Bar) Foo (Bar) stuff Foo (Bar) stuff things Foo stuff Foo stuff things TODO: This will likley erroroneously match on authors names that are uncapitalized, e.g.:
Foo stuff von Helsing, 1920
# File lib/splitter/tokens.rb, line 262 def initialize(str) str.strip str =~ %r\A\s*([A-Z][^\s]+)\s*(\([A-Z][a-z]+\))?\s?([a-z][^\s]+)?\s?([a-z][^\s]+)?\s*/ @genus = $1 @subgenus = $2 @species = $3 @subspecies = $4 if @subgenus =~ %r\((.*)\)/ @subgenus = $1 end end