regular expression matches a comma and a space (/, /) : Convert to Array « String « Ruby






regular expression matches a comma and a space (/, /)


c_w = "George Jones, Conway Twitty, Lefty Frizzell, Ferlin Husky"
puts c_w.split(/, /) 

 

Related examples in the same category

1.From a String to an Array
2.splitting up all the individual values and converting them into elements