Regular Expressions 101

Community Patterns

CSV: Escape double quotes (") in quoted cells (v1.0)

1

Regular Expression
Python

r"
(\n|;|^)"([^";\n]*?)"([^";\n]+?)"([^";\n]*?)"(\n|;|$)
"
g

Description

A stable and simple RegEx, which escapes double-quotes (") in a CSV file.

Submitted by rugk - 8 years ago