Perl-Sensitive Sunglasses | |
PerlMonks |
Re: need to parse firts part of SQL-query (regex question)by almut (Canon) |
on Jan 17, 2008 at 16:32 UTC ( [id://662913]=note: print w/replies, xml ) | Need Help?? |
Here's a (somewhat ugly) attempt using Text::Balanced. The idea is to extract the balanced parentheses fragments, in order to apply the split to the remaining parts of the string only.
Output:
(Not well tested — also, I have that feeling there must be something more elegant than this mess of conditionals... but it's escaping me right now :)
In Section
Seekers of Perl Wisdom
|
|