Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: split on commasby tphyahoo (Vicar) |
on Jun 08, 2009 at 21:11 UTC ( [id://769680]=note: print w/replies, xml ) | Need Help?? |
Not a beginner answer, but the "principled" way to solve this is to use a parser, not a regex.
Parse::RecDescent is such a parser. However, as the other answers have said, there are ways to "cheat" around this without using a full blown parser. The cheats may be brittle... for example, what happens if you have brackets inside a bracket, and commas inside that? However they'll work for most purposes.
In Section
Seekers of Perl Wisdom
|
|