Artificial intelligent assistant

Replacing wrongly escaped quotes with sed I need to clean a very large CSV, which has wrongly escaped double quotes (`\\"` instead of `\"`). How can I replace all instances of \\" \\\" \\\\" ..... with `\"` or just space? Since it has `\` I asked this question to avoid adding to the mess.

This should be enough:


sed 's/\\\\*"/\\"/'


This replaces a backslash (`\\`) followed by any number of backslashes (`\\*`) and a double quote (`"`), with a backslash followed by a double quote (`\\"`). Use `sed 's/\\\\*"/\\"/g`' for replacing all occurrences in a line.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 755a02774b27b62936cf96508a9e5ec5