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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find CSV parser (with Quotes) (.NET)
Expression
\A[^,"]*(?=,)|(?:[^",]*"[^"]*"[^",]*)+|[^",]*"[^"]*\Z|(?<=,)[^,]*(?=,)|(?<=,)[^,]*\Z|\A[^,]*\Z
Description
Returns the value from a CSV line.
Matches
,,"",a,a"",""a,a""a,aa""a,",",a"a,a"a",aa",bb" | as,"fsfdf,g | ,"as,"fsfdf,g"
Non-Matches
|
Author Rating: The rating for this expression. Iulian Fecioru
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: CSV parser (without Quotes) (.NET) ??
Name: Fredd
Date: 11/9/2011 7:12:54 PM
Comment:
I tried other, by David Oldfield which only works with quoted "hello","etc" values. this one works for both. except it returns all quotes, is there a version that returns the values without quotes?


Title: Question to OAL
Name: Iulian Fecioru
Date: 5/20/2011 8:43:59 AM
Comment:
OAL, the change fixed the python issue?


Title: Best Regex of the world!
Name: Wei
Date: 5/21/2010 3:13:57 AM
Comment:
This one is best regex for parsing csv file. almost all of them.


Title: Changed
Name: Iulian Fecioru
Date: 5/5/2010 1:39:23 AM
Comment:
I've changed the expression, hoping that this will work on any engine.


Title: Any chance for python
Name: OAL
Date: 1/27/2009 3:50:01 AM
Comment:
Is there any chance to get this regexp working for python? I have a "unexpected end of pattern" error Any Help is gladly appreciated!


Title: Any chance for python
Name: OAL
Date: 1/27/2009 3:38:51 AM
Comment:
Is there any chance to get this regexp working for python? I have a "unexpected end of pattern" error Any Help is gladly appreciated!


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