<div dir="ltr">Weird, it looks right here: <a href="http://www.rubular.com/r/ZhdGrFCNRH">http://www.rubular.com/r/ZhdGrFCNRH</a><div>(I took out the extra match on the entire string)</div><div>I can&#39;t figure out why the regex command in fs_cli isn&#39;t working. (1|12) seems to break it... Should work in the dialplan, though.</div>

<div><br></div><div><br></div><div>To help you understand why this would work...</div><div>1) Your main issue was trying to match the *, it needs to be escaped like \*.</div><div>2) You needed to wrap the matching parts in ()</div>

<div>3) the [] match a single character from the set. So to mix matching 1 or 3 or 12 you need to put in (1|3|12)</div><div><br></div><div>FreeSWITCH wiki has a pretty decent examples / intro to regex wiki page: <a href="http://wiki.freeswitch.org/wiki/Regex">http://wiki.freeswitch.org/wiki/Regex</a></div>

<div><br></div><div><br clear="all"><div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small">-Avi<br></span></div></div>
<br><br><div class="gmail_quote">On Mon, Jul 1, 2013 at 10:08 AM, Vishal Kakkar <span dir="ltr">&lt;<a href="mailto:vishal.kakkar@gmail.com" target="_blank">vishal.kakkar@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div>Hi Mariusz,<br><br></div>Thanks for quick reply. Following is error i am getting while testing the same<br><div><br>freeswitch@localhost.localdomain&gt; regex 1234567890*123456*12*|^((\d{10})\*(\d{6})\*(1|3|12)\*)$<br>


<br>1234567890*123456*12*<br>2013-07-01 12:33:58.980772 [ERR] switch_regex.c:101 COMPILE ERROR: 23 [missing )][^((\d{10})\*(\d{6})\*(1]<br>freeswitch@localhost.localdomain&gt;  <br><br></div><div>Thanks,<br></div><div>-Vishal.<br>


</div><div><div class="h5"><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 1, 2013 at 12:31 PM, Mariusz Czulada <span dir="ltr">&lt;<a href="mailto:manieq@wp.eu" target="_blank">manieq@wp.eu</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">try:<br>
^((\d{10})\*(\d{6})\*(1|3|12)\*)$<br>
you should get then:<br>
$1 - everything<br>
$2 - first 10-digit part<br>
$3 - second 6-digit number<br>
$4 - third - last part - extension<br>
<br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto: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="mailto: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><br>
</blockquote></div><br></div></div></div></div></div></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></div></div>