How To Use Multiply Arguments In Split

[Solved] How To Use Multiply Arguments In Split | Perl - Code Explorer | yomemimo.com
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

Answers related to how to use multiply arguments in split

Code Explorer Popular Question For Perl