Sure Jay, I'm no guru but I use regex whenever I can.<br><br>What do you mean when you say "based on what is between '( )'"? <br><br>- Dave<br><br><div class="gmail_quote">On Fri, Feb 19, 2010 at 10:17 AM, Jay Swackhamer <span dir="ltr"><<a href="mailto:Jay@reboottheuser.com">Jay@reboottheuser.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Looking at examples, not getting it done.<br>
<br>
Any regex gurus out there that can give me a tip on taking a string and splitting into groups based on what is between '( )'<br>
<br>
So I can take condstring, split it into an array by whats grouped in (), then take each element and split out the rest of the () groups.<br>
i.e.<br>
<br>
 my $condstring="include_1 (f7 ne \'ce\' and f10 ne \'r\' and f1 ne \'ce\' and f8 ne \'lg\' and f8 ne \'li\' and f8 ne \'lj\' and f8 ne \'lr\' and f8 ne \'lu\' and f8 ne \'lv\' and f8 ne \'tl\' and f8 ne \'ta\' and(f4 eq \'e\' or f4 eq \'g\' or f4 eq \'w\')) ";<br>
<br>
 @condarr = split /(\).*\))/, $condstring;<br>
<br>
<br>
-- <br>
Jay Swackhamer<br>
Reboot The User<br>
402-933-6449<br>
<a href="http://www.reboottheuser.com" target="_blank">http://www.reboottheuser.com</a><br>
<a href="http://www.cafepress.com/rtu" target="_blank">http://www.cafepress.com/rtu</a><br>
<a href="http://stores.ebay.com/RebootTheUser" target="_blank">http://stores.ebay.com/RebootTheUser</a><br>
<a href="http://www.hotr.com" target="_blank">http://www.hotr.com</a><br>
<br>
<br>
<br>
_______________________________________________<br>
Omaha-pm mailing list<br>
<a href="mailto:Omaha-pm@pm.org" target="_blank">Omaha-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/omaha-pm" target="_blank">http://mail.pm.org/mailman/listinfo/omaha-pm</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Dave Burchell<br>