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 Match fields in a csv row
Expression
(\"(?<word>[^\"]+|\"\")*\"|(?<word>[^,]*))
Description
This will match fields in a row of a csv file. Values can be double quoted or not. If a value is double quoted it can have commas inside it. Each value will be captured to word.
Matches
"test","test this",test, test,test ,"123,456.12"
Non-Matches
'te, st'
Author Rating: The rating for this expression. jeremy chapman
   Displaying page 1 of 1 pages; Items 1 to 1

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