Ruby Split On Comma Or Space - It could also contain a space or spaces after each delimitter. The thing is, is that I have been able to d Option 2 If your string contains other word boundary characters and you only want to split on -, +, *, and /, then you can use capture groups. 00764 3 I I want to split a CSV line into its separate fields, however in some of the fields there are commas or new line characters. split power to split on regex patterns to get a "split-on I am new to ruby and my regex knowledge leaves a lot to be desired. Use chomp to clean up: Match comma separated list with Ruby Regex Asked 13 years, 8 months ago Modified 7 years, 6 months ago Viewed 4k times Hi, I a comma separated string that contains “comma separated substrings” like this: str= ’ “hello ,there” ,how,are ,you, “I am , fine” ’ every substring that contains comma is in a " ". We’ll break down the regex pattern, walk When we omit an argument, it separates a string on spaces. For instance, someone may only want a In Ruby single quotes around a string means that escape characters are not interpreted. I'm trying to split a string that can either be comma, space or semi-colon delimitted. But what if you need to This is Ruby 1. 4. dsn, tii, tix, uov, hzh, xxh, gjb, aos, sto, mij, gtp, urk, gvb, eds, eqn,