How to split a string in Ruby and get all items except the first one? January 28, 2023 by Tarik Try this: first, *rest = ex.split(/, /) Now first will be the first value, rest will be the rest of the array.