how to use multiply arguments in .split
delimiters = [',', ' ', "'"] word.split(Regexp.union(delimiters)) # => ["Now", "is", "the", "time", "for", "all", "good", "people"]
Source: stackoverflow.com
how to use multiply arguments in .split
delimiters = [',', /\s/, "'"] word.split(Regexp.union(delimiters)) # => ["Now", "is", "the", "time", "for", "all", "good", "people"]
Source: stackoverflow.com