How would I write code in SED to remove the data enclosed in quotes, in a CSV file? In addition, the code must also ignore any other quotes inside the field itself.
For example:
Before: ,"Hi "Bob" how are you?",
After: ,,
Fortunately Excel will tag double quotes inside a quoted field with an extra quote so I'm actually dealing with data like this:
,"Hi ""Bob"" how are you?",
However, I suspect my code is aborting the pattern match at the first quote on the left of "Bob" which leaves the entire field unmodified. The code I was trying to use is:
s/,"[^"]*",/,,/
How can I make it ignore the double quotes inside the field and only pick up the last ",?