I have a ruby string car_1_ford I want the out put to be
car 1 ford
what is the best way in ruby to parse this string?
If you'll ever need some more advanced patterns you can use regular expressions.
Here you have Documentation.
Example:
irb(main):012:0> "a_b----c==d".gsub!(/[-_=]+/, ' ')
=> "a b c d"
'car 1 ford'or['car', '1', 'ford']as your result?