I'm trying to grab data from a MySQL database and use Ruby to reformat it into a flat text file. Some of my MySQL data contains double quotes like so:
Matthew "Matt" Perry
and I need to remove those quotes and replace them with something else, | for instance.
I found another post on stackoverflow about removing quotes that suggested the following:
s.scan(/'(.+?)'|"(.+?)"|([^ ]+)/).flatten.compact
but that returns the string intact (with double quotes). How can I get
Matthew |Matt| Perry
instead?