In this case the ? modifies the *, so there&#39;s .* (greedy) and .*? (not greedy)<br><br>You want your .* to match as little as possible instead of as much as possible. If you use .* instead of .*? then your $2 would contain both the ndpi info but also it would have &quot;;rn=18005551212&quot; b/c the .* would grab all that stuff. The .*? would only grab up to the &quot;;rn&quot;.<br>
<br>Just adding that info for posterity&#39;s sake. :)<br><br>-MC<br><br><div class="gmail_quote">On Mon, Jan 7, 2013 at 5:05 PM, Ken Rice <span dir="ltr">&lt;<a href="mailto:krice@freeswitch.org" target="_blank">krice@freeswitch.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>
<font face="Monaco, Courier New"><span style="font-size:11pt">Ooops yeah I mean .*... The ? Is pretty useless there... Since there should always be something if they send ndpi=<br>
<br>
<br>
On 1/7/13 7:00 PM, &quot;Michael Collins&quot; &lt;<a href="http://msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt; wrote:<br>
</span></font><blockquote><blockquote><blockquote><font face="Monaco, Courier New"><span style="font-size:11pt"><br>
</span></font></blockquote></blockquote><font face="Monaco, Courier New"><span style="font-size:11pt">Just a quick FYI... be careful when you use .* because it will try to match EVERYTHING. Also, Ken accidentally typed (*.) which I&#39;m sure wasn&#39;t what he was aiming for. ;)<br>

<br>
Maybe this would be more effective:<br>
^(?:+1|1)?([2-9]\d{2}[2-9]\d{6});ndpi=(.*?);rn=([2-9]\d{2}[2-9]\d{6})$<br>
<br>
-MC<br>
<br>
<hr align="CENTER" size="3" width="95%"></span></font><font><font face="Consolas, Courier New, Courier"><span style="font-size:10pt">_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="http://consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="http://FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><span class="HOEnZb"><font color="#888888"><br>
</font></span></span></font></font></blockquote><span class="HOEnZb"><font color="#888888"><font><font face="Consolas, Courier New, Courier"><span style="font-size:10pt"><br>
</span></font></font><font face="Monaco, Courier New"><span style="font-size:11pt">-- <br>
Ken<br>
<font color="#0000FF"><u><a href="http://www.FreeSWITCH.org" target="_blank">http://www.FreeSWITCH.org</a><br>
<a href="http://www.ClueCon.com" target="_blank">http://www.ClueCon.com</a><br>
<a href="http://www.OSTAG.org" target="_blank">http://www.OSTAG.org</a><br>
</u></font><a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
</span></font>
</font></span></div>


<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Michael S Collins<br>Twitter: @mercutioviz<br><a href="http://www.FreeSWITCH.org" target="_blank">http://www.FreeSWITCH.org</a><br><a href="http://www.ClueCon.com" target="_blank">http://www.ClueCon.com</a><br>
<a href="http://www.OSTAG.org" target="_blank">http://www.OSTAG.org</a><br><br>