Ok, a good strategy might be to break it up by the ( and ) characters first, then further process the parts:<br><br>@part = split(/[()]/, $condstring);<br><br>This gives you a &quot;shallow parse&quot;, which may or may not be a useful starting point.<br>

<br>- Dave<br><br><div class="gmail_quote">On Fri, Feb 19, 2010 at 10:45 AM, Jay Swackhamer <span dir="ltr">&lt;<a href="mailto:Jay@reboottheuser.com" target="_blank">Jay@reboottheuser.com</a>&gt;</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;">In the string below, it&#39;s from a parameter file.<br>
<br>
I need to break it out by what&#39;s the longest string between the &#39;(&#39; and the &#39;)&#39;<br>
and then the shorter strings between &#39;(&#39; and &#39;)&#39; , then the and/or&#39;s so I can translate/process the logic.<br>
<br>
the include_1 would be a condition name, and the f7/f10/f8 etc are field names that are substrings of lines of data.<div><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></div><div><div></div><div>
Quoting Dave Burchell &lt;<a href="mailto:evaddnomaid@gmail.com" target="_blank">evaddnomaid@gmail.com</a>&gt;:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sure Jay, I&#39;m no guru but I use regex whenever I can.<br>
<br>
What do you mean when you say &quot;based on what is between &#39;( )&#39;&quot;?<br>
<br>
- Dave<br>
<br>
On Fri, Feb 19, 2010 at 10:17 AM, Jay Swackhamer  &lt;<a href="mailto:Jay@reboottheuser.com" target="_blank">Jay@reboottheuser.com</a>&gt;wrote:<br>
<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<br>
splitting into groups based on what is between &#39;( )&#39;<br>
<br>
So I can take condstring, split it into an array by whats grouped in (),<br>
then take each element and split out the rest of the () groups.<br>
i.e.<br>
<br>
 my $condstring=&quot;include_1 (f7 ne \&#39;ce\&#39; and f10 ne \&#39;r\&#39; and f1 ne \&#39;ce\&#39;<br>
and f8 ne \&#39;lg\&#39; and f8 ne \&#39;li\&#39; and f8 ne \&#39;lj\&#39; and f8 ne \&#39;lr\&#39; and f8<br>
ne \&#39;lu\&#39; and f8 ne \&#39;lv\&#39; and f8 ne \&#39;tl\&#39; and f8 ne \&#39;ta\&#39; and(f4 eq \&#39;e\&#39;<br>
or f4 eq \&#39;g\&#39; or f4 eq \&#39;w\&#39;)) &quot;;<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>
<br>
</blockquote>
<br>
<br>
<br>
--<br>
Dave Burchell<br>
<br>
</blockquote>
<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Dave Burchell<br>