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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find 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
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Does not seem working
Name: does not work
Date: 1/30/2008 10:50:10 AM
Comment:
does not work


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