Re: [Freeswitch-users] RegEx Help
If the global var "auto_hunt" is "true" the xml dialplan will try to find an
extension where the "name" param matches the destination number. This is
not the default
The default is to try them in order from top to bottom.
On Mon, Nov 9, 2009 at 3:20 PM, Michael Collins wrote:
>
>
> On Mon, Nov 9, 2009 at 1:10 PM, wrote:
>
>> Dave Stevenson said:
>>
>> > ^([1-3][1-9][0-9]|[2-3][0-9][0-9])$
>>
>> Another possibility.
>>
>> ^(1(0[1-9]|[1-9]\d)|[2-3]\d{2})
>>
>>
> Yep this is the one. I'm sorry I didn't read the OP correctly the first
> time. Skipping 100 and matching 101 is the tricky part, obviously. This
> regex should fit the bill.
> -MC
>
>
> ___
> 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
>
>
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm
MSN:[email protected]
GTALK/JABBER/PAYPAL:[email protected]
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:[email protected]
iax:[email protected]/888
googletalk:[email protected]
pstn:213-799-1400
___
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
Re: [Freeswitch-users] RegEx Help
On Mon, Nov 9, 2009 at 1:10 PM, wrote:
> Dave Stevenson said:
>
> > ^([1-3][1-9][0-9]|[2-3][0-9][0-9])$
>
> Another possibility.
>
> ^(1(0[1-9]|[1-9]\d)|[2-3]\d{2})
>
>
Yep this is the one. I'm sorry I didn't read the OP correctly the first
time. Skipping 100 and matching 101 is the tricky part, obviously. This
regex should fit the bill.
-MC
___
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
Re: [Freeswitch-users] RegEx Help
Dave, I think extensions are processed in order although I can't quickly find any documentation that says this, why don't you try it and see, it would take only a moment to find out for sure. --Stephen On Mon, Nov 9, 2009 at 1:03 PM, Frank Carmickle wrote: > On Mon, Nov 09, Michael Collins wrote: > > On Mon, Nov 9, 2009 at 12:22 PM, Dave Stevenson > > 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])$ > > You mean > > (^1[0-9][1-9]$|^[2-3]\d\d$) > > --FC > > ___ > 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
Re: [Freeswitch-users] RegEx Help
Dave Stevenson said:
> ^([1-3][1-9][0-9]|[2-3][0-9][0-9])$
Another possibility.
^(1(0[1-9]|[1-9]\d)|[2-3]\d{2})
--
Russell Mosemann
Concordia University, Nebraska
See http://www.cune.edu/ for the latest news and events!
___
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
Re: [Freeswitch-users] RegEx Help
Hi Frank Yup ! That's what I mean :-) thanks a lot, regards Dave - Original Message - From: "Frank Carmickle" To: Sent: Monday, November 09, 2009 9:03 PM Subject: Re: [Freeswitch-users] RegEx Help > On Mon, Nov 09, Michael Collins wrote: >> On Mon, Nov 9, 2009 at 12:22 PM, Dave Stevenson >> 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])$ > > You mean > > (^1[0-9][1-9]$|^[2-3]\d\d$) > > --FC > > ___ > 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
Re: [Freeswitch-users] RegEx Help
On Mon, Nov 09, Michael Collins wrote: > On Mon, Nov 9, 2009 at 12:22 PM, Dave Stevenson > 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])$ You mean (^1[0-9][1-9]$|^[2-3]\d\d$) --FC ___ 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
Re: [Freeswitch-users] RegEx Help
Thanks Michael, but I want to exclude 100 ? regards Dave - Original Message - From: Michael Collins To: [email protected] Sent: Monday, November 09, 2009 8:38 PM Subject: Re: [Freeswitch-users] RegEx Help On Mon, Nov 9, 2009 at 12:22 PM, Dave Stevenson 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 ? expression="^[1-3]\d\d$" will match 100 to 399 -MC -- ___ 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
Re: [Freeswitch-users] RegEx Help
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? --Stephen On Mon, Nov 9, 2009 at 12:22 PM, Dave Stevenson 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
Re: [Freeswitch-users] RegEx Help
Would something like this work for you? --Stephen On Mon, Nov 9, 2009 at 12:22 PM, Dave Stevenson 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
Re: [Freeswitch-users] RegEx Help
On Mon, Nov 9, 2009 at 12:22 PM, Dave Stevenson 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 ? > > expression="^[1-3]\d\d$" will match 100 to 399 -MC ___ 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] RegEx Help
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
