I have a comma-delimited CSV file (,
) where commas are escaped by surrounding the data in quotation marks ("
).
ID,Email,Job Title
1001,[email protected],Technician
1002,[email protected],"Specialist, HRIT"
1003,[email protected],"Director, Nursing"
I want to convert my CSV to a pipe-delimited file (|
) by using Notepad++ to find and replace any commas that aren't enclosed in double quotes ("
) with a pipe.
ID|Email|Job Title
1001|[email protected]|Technician
1002|[email protected]|"Specialist, HRIT"
1003|[email protected]|"Director, Nursing"
My first approach was to use a regular expression to match any unquoted commas. However, searching for ("[^"]*")|,
in Notepad++ replaced both unquoted commas and any quoted strings that contained a comma.
1002|[email protected]||
How can I convert a comma-delimited CSV file (,
) to a pipe-delimited file (|
) with Notepad++?