Perhaps you could use an online tool to test your regexes? If I understand correctly, the regexes in FS are all Perl-style regexes and there are a number of online or downloadable tools that will allow you to see the effect of your developing regex on a sample set of data. If this is the case, could anyone recommend a tool?<br>
<br>Tom<br><br><div class="gmail_quote">On 2 June 2010 22:17, RR <span dir="ltr"><<a href="mailto:ranjtech@gmail.com">ranjtech@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Wed, Jun 2, 2010 at 2:17 PM, Michael Collins <span dir="ltr"><<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br><br><div class="gmail_quote"><div>On Tue, Jun 1, 2010 at 7:57 PM, Ron McLeod <span dir="ltr"><<a href="mailto:ron.freeswitch@mcleodnet.com" target="_blank">ron.freeswitch@mcleodnet.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="blue" lang="EN-US">
<div>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;">Is [32|48|54|55|65] correct? Shouldn’t
it be (32|48|54|55|65) instead?</span></font></p><div>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;">^\+?1?(0[0-1]+)?((32|48|54|55|65)\d+)\;?(phone-context=)?\+?(\d+)?$</span></font></p></div></div>
</div></blockquote></div><div>Also, you really don't need the dash in [0-1], just do [01] which means "match a 0 or a 1"<br>-MC<br></div></div><br></blockquote><div><br></div></div></div><div>Ok cool. Thanks for that. BTW, I've noticed that the regex CLI command doesn't always behave the same way as the core FS engine. A lot of tests that display a different result when testing using the regex command yield different behaviour when one makes a call and how FS behaves/treats the call. Maybe it's a bug in the old version. We're using a very old version of FS </div>
</div>
<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>