[asterisk-users] exten => pattern match query

Steve Davies davies147 at gmail.com
Tue May 13 06:44:43 CDT 2008


2008/5/12 Steve Davies <davies147 at gmail.com>:
> Hi,
>
>  I read the WiKi, which implied there was a way of working around this,
>  but the HTML nature of the WiKi seems to have destroyed some of the
>  output so I cannot see the correct answer...
>
>  I would like to match a special case of a number dialled "0x....", now
>  normally I would simply do:
>
>     exten => _0x.,1,NoOp(Got Hex dialling)
>
>  But the "X" pattern match is case-insensitive, so the above pattern
>  will match any 3 or more digit number starting with a zero. I suspect
>  that the answer may be:
>
>     exten => _0[x].,1,NoOp(Got Hex dialling)
>
>  Could someone confirm this for me?
>

For the archives, in 1.2.28, the following is true...

_0x.
matches a 0, followed by a digit ('x' is NOT a digit) followed by anything

_0[x].
matches a 0 followed by a lower case X followed by anything.

I should have just tried it for myself in the first place :)
Steve



More information about the asterisk-users mailing list