I took this regex from this question: What Vim command(s) can be used to quote/unquote words?
:%s/\([^,]\+\)/"\1"/g
It turns this:
foo,foo bar,bar@foo,foo# bar,bar$ foo#
into this:
"foo","foo bar","bar@foo","foo# bar","bar$ foo#"
I would like to modify the regex to work with this:
foo, foo bar ,bar@foo ,foo# bar, bar$ foo#
turning it into this:
"foo", "foo bar", "bar@foo", "foo# bar", "bar$ foo#"
Any suggestions?