Question : how to use multiply arguments in .split
Answered by : eager-earthworm-qia8x9uz4lhg
delimiters = [',', /\s/, "'"]
word.split(Regexp.union(delimiters))
# => ["Now", "is", "the", "time", "for", "all", "good", "people"]
Source : https://stackoverflow.com/questions/19509307/split-string-by-multiple-delimiters?answertab=trending#tab-top | Last Update : Thu, 28 Jul 22
Question : how to use multiply arguments in .split
Answered by : eager-earthworm-qia8x9uz4lhg
delimiters = [',', ' ', "'"]
word.split(Regexp.union(delimiters))
# => ["Now", "is", "the", "time", "for", "all", "good", "people"]
Source : https://stackoverflow.com/questions/19509307/split-string-by-multiple-delimiters?answertab=trending#tab-top | Last Update : Thu, 28 Jul 22