I want to split a string by whitespaces, , and \' using a single ruby command.
,
\'
word.split will split by white spaces
word.split
Here is another one :
word = "Now is the,time for'all good people" word.scan(/\w+/) # => ["Now", "is", "the", "time", "for", "all", "good", "people"]