in reply to Regex Conundrum
Here's an example straight from the Text::CSV POD:
use Text::CSV; $csv = Text::CSV->new(); # create a new object $status = $csv->parse($line); # parse a CSV string into fields @columns = $csv->fields(); # get the parsed fields
Don't use a regex to do what can be done more reliably with a tried and proven module. Text::CSV is the right tool for the job. You'll find it even properly handles commas embeded in quoted strings.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex Conundrum
by dragonchild (Archbishop) on Jun 13, 2004 at 05:10 UTC | |
by davido (Cardinal) on Jun 13, 2004 at 05:14 UTC |