[asterisk-users] REGEX expression for NXXNXXXXXX?
Mik Cheez
michael_bulk at wildgate.com
Thu Jul 5 13:33:36 CDT 2007
My mistake...you're correct...should have tested it.
Mojo with Horan & Company, LLC wrote:
> But those are not REGEX expressions, those are asterisk dialplan
> pattern-matching expressions. great for the X in:
>
> exten => _X.,1,blah
>
> but not for use with REGEX() function.
>
> I think it would be close to what Michael said, but like this:
> 1{0,1}[2-9][0-9]{2}[2-9][0-9]{6}
>
> Michael, your expression would be satisfied by "1220000000" which has a
> 0 in the first part of the prefix, no good, that one must be within 2-9
> range also. "1 220 *0*00 0000"
>
>
> Moj
>
> Noah Miller wrote:
>> Hi Again Brent -
>>
>>>> What would a valid regexp in Asterisk be to identify a NANP number, i.e.,
>>>> NXXNXXXXXX?
>>> I think you've got it right already. What do you need to do?
>> If you wanted to get more specific and identify ONLY NANP, you may
>> have to break it out into more than just one rule:
>>
>> _800NXXXXXX
>> _888NXXXXXX
>> _877NXXXXXX
>> _866NXXXXXX
>> ....
>>
>> etc.
>>
>> BTW: I just read up and discovered that 855, 844, 833, and 822 are
>> reserved but not yet used.
>>
>>
>> - Noah
>>
>> _______________________________________________
>> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
More information about the asterisk-users
mailing list