Some characters need a backslash to match in a regular expression. However, # is not one of them. I think your regex is wrong:<br><condition field="destination_number" expression="^1#(d+)#(d+)$"/><br>
<br>It should probably be:<br><condition field="destination_number" expression="^1#(\d+)#(\d+)$"/><br><br>Note the backslashes in front of the d+ entries. \d means "match a digit" whereas a bare d means "make a lowercase d character".<br>
<br>Hope that helps.<br>-MC<br><br>P.S. - The * character does need to be escaped in regexes. See the default.xml dialplan file for some obvious examples.<br><br><div class="gmail_quote">On Sat, Oct 10, 2009 at 6:24 AM, Milena <span dir="ltr"><<a href="mailto:testeador01@gmail.com">testeador01@gmail.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;">escape character is '\'<div>try <div class="im"><br> <condition field="destination_number" expression="^1\#(d+)\#(d+)$"/><br>
</div><div class="gmail_quote">2009/10/10 daqiang wang <span dir="ltr"><<a href="mailto:wangdq.no1@gmail.com" target="_blank">wangdq.no1@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">hello every one : <br> I want to match the # in XML dialplan , how to do ? <br>
example : <br> 1#5555#6666 . how to do ? <br>
I do this : <br> <condition field="destination_number" expression="^1#(d+)#(d+)$"/><br>
but it's not work <br>
<br></div></div>_______________________________________________<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>
<br></blockquote></div><br></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><input id="gwProxy" type="hidden"><input onclick="jsCall();" id="jsProxy" type="hidden"><div id="refHTML"></div>