need a regex to parse a csv file with double quotes in php
Posted
by
Brandon G
on Stack Overflow
See other posts from Stack Overflow
or by Brandon G
Published on 2011-01-09T06:31:44Z
Indexed on
2011/01/09
6:53 UTC
Read the original article
Hit count: 422
Trying to parse a csv file that has all the data wrapped in double quotes, because there may be commas in the double quotes.
Looks like this:
$songs = '"1, 2, 3, 4 (I Love You)","Plain White T's","CBE10-22",15,"CBE10-22","","","CB",984,"","10/05/10"';
$regResult = preg_match( "", $songs, $matches );
I can't figure out a regex that will return the data between the quotes as the matches. I'm sure there is some regex master that can help me with this.
© Stack Overflow or respective owner