RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details CSV exported from Excel (all variants)
Expression
;?(?:(?:"((?:[^"]|"")*)")|([^;]*))
Description
This expressions parses one line from a CSV file which has been written with Excel. It does cover all variants: simple value, value masked by double quotes (including semicolons between double quotes which don't count) and double quotes masked by double quotes (""). Replace all semicolons within the regex to change the separator character.
Matches
abc;efg;"Column with ;";"Column with ; and ""double quotes""";;ijk;
Non-Matches
abc,efg,'test',ijk
Author Rating: The rating for this expression. Sven
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials