Regex to match CSV file nested quotes
- by user361970
Hi,
I know this has been discussed a million times. I tried searching through the forums and have seen some close regex expressions and tried to modify them but to no avail.
Say there is a line in a csv file like this:
"123", 456, "701 "B" Street", 910
Is there an easy regex to detect "B" (since its a non-escaped set of quotes within the normal CSV quotes) and replace it with something like \"B\" ? The final string would end up looking like this:
"123", 456, "701 \"B\" Street", 910
Help would be greatly appreciated!