Hi Stephen,

thanks for the reply.

I'm not sure , does the code below handle all number from 101 to 399 ? 

It would rely on the 100 code being picked up by the dialplan before the other 
extensions were processed so the order of the code in the dialplan is 
significant. Is that how people normally write their code, i.e., the extension 
processing is position dependant in the file ?

regards
Dave


  ----- Original Message ----- 
  From: Stephen Crosby 
  To: [email protected] 
  Sent: Monday, November 09, 2009 8:37 PM
  Subject: Re: [Freeswitch-users] RegEx Help


Would something like this work for you?<extension name="some-extension">  
<condition field="destination_number" expression="^100$">
    <!-- do something -->  </condition></extension><extension 
name="another-extension">  <condition field="destination_number" 
expression="^([1-9]\d{2})$">
    <!-- do something else -->  </condition></extension>--Stephen


  On Mon, Nov 9, 2009 at 12:22 PM, Dave Stevenson <[email protected]> 
wrote:

    I **think** that the following will match any three character strings from 
1xx to 399

    I want to exclude 100 though, can anyone help me with the required RegEx 
please ?


    ^([1-3][0-9][0-9])$

    I could (I think) do 

    ^([1-3][1-9][0-9]|[2-3][0-9][0-9])$

    But it does not "feel" elegant - is there a better way ?


    regards
    Dave

    _______________________________________________
    FreeSWITCH-users mailing list
    [email protected]
    http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
    UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
    http://www.freeswitch.org






------------------------------------------------------------------------------


  _______________________________________________
  FreeSWITCH-users mailing list
  [email protected]
  http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
  UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
  http://www.freeswitch.org
_______________________________________________
FreeSWITCH-users mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Reply via email to