There's more than one way to do things | |
PerlMonks |
Regexp nightmare with CSVby Pingu (Sexton) |
on May 28, 2001 at 20:09 UTC ( [id://83744]=perlquestion: print w/replies, xml ) | Need Help?? |
Pingu has asked for the wisdom of the Perl Monks concerning the following question: I'm writing a small script for my running club's site to allow searchable race results. The data is stored in a CSV format file which I split(/,/) on commas into an array. This is all great except some of the data fields contain commas which I want to keep: The file looks something like this:
The commas in the 4th field are to be kept, not split on. I've tried:
but it doesn't work - it picks up the wrong commas. Can anyone help please? I have a feeling that I need a non-backtracking pattern but I can't suss it. Thanks folks, Pingu Edited 2001-05-28 by Ovid
Back to
Seekers of Perl Wisdom
|
|