Title |
Test
Find
Pattern Title
|
Expression |
(?<=,)\s*(?=,)|^(?=,)|[^\"]{2,}(?=\")|([^,\"]+(?=,|$)) |
Description |
Use for parsing CSV files exported from MS Excel, This program adds or not quotes, so it's more complicated..
Use for parsing individual lines, the Regex doesn't capture end of line (supposed to ($) but not made it in the testing so you cannot parse the whole file.
Read a line and split it, with this regex
|
Matches |
,Casa en condominio / Traspaso,"$270,000 ","mn,","Toluca,","67 m2 |
Non-Matches |
"" |
Author |
Rating:
itzco calva
|
Source |
|
Your Rating |
|
Title: This works with leading commas also - very helpful
Name: Shad Robinson
Date: 3/9/2017 7:06:34 PM
Comment:
For implementation in c# make the \s be \\s
Title: Incorrectly parses fields containing quotes
Name: Hans
Date: 9/13/2006 1:45:24 AM
Comment:
,"""a", "bb","cc",
I have not yet seen one doing it right.
Title: not correct
Name: viktor
Date: 6/29/2005 2:39:03 PM
Comment:
Hi.
your expression will not match following example:
"$99"",000.00 ",,6/22/2005,AAKO INC DBA,WALDOWSKI,KERRI-ALLYSON,660006408789,,,,