cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2496
Views
9
Helpful
5
Replies

Interesting destination-pattern regex puzzle

Hi Experts,

I am trying to write a single regular expression for the destination-pattern command to match all 4 digit numbers except 41XX and 42XX ?

Can you pelase help me?

Thanks,

Bala.

1 Accepted Solution

Accepted Solutions

Funny.  Sorry, I just assumed you were concerned with the 4xxx range.  Anyway, for this you will need two dial-peers.

To match: 1000-4099 and 4300-9999

One dial-peer destination pattern: 4[0,3-9]..

The other dial-peer destination pattern: ^0^4...  (which means that the first digit can't be a 0 or a 4)

HTH.

Regards,

Bill

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

View solution in original post

5 Replies 5

William Bell
VIP Alumni
VIP Alumni

You could use:

destination-pattern 4[0,3-9]..

See this link for more information and ideas on how you can use wildcards with destination patterns:

http://www.cisco.com/en/US/docs/ios/voice/dialpeer/configuration/guide/vd_dp_feat_cfg_ps6441_TSD_Products_Configuration_Guide_Chapter.html#wp1067070

HTH.

Regards,

Bill

Please remember to rate helpful posts.

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

Hi Bill,

Thanks a lot for your reply and the link.

destination-pattern 4[0,3-9] will match only numbers in the raneg 40XX and 43XX-49XXX.

I ws looking for a single destination pattern that will match all 4 digit extensions except 41xx and 42xx (all numbers in the range 1000-4099 and 4300-9999).

Any ideas on constructing the desired range using a single reg-ex?

Thanks,

Bala.

Funny.  Sorry, I just assumed you were concerned with the 4xxx range.  Anyway, for this you will need two dial-peers.

To match: 1000-4099 and 4300-9999

One dial-peer destination pattern: 4[0,3-9]..

The other dial-peer destination pattern: ^0^4...  (which means that the first digit can't be a 0 or a 4)

HTH.

Regards,

Bill

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

Perfect Answer!!!

Thanks a lot, Bill !!!

Cheers,

Bala.

No problem.  Glad to be of assistance.

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: