04-06-2010 08:36 AM - edited 03-15-2019 10:07 PM
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.
Solved! Go to Solution.
04-07-2010 06:32 AM
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
Please remember to rate helpful responses and identify
04-06-2010 10:58 AM
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.
Please remember to rate helpful responses and identify
04-07-2010 01:18 AM
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.
04-07-2010 06:32 AM
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
Please remember to rate helpful responses and identify
04-07-2010 07:33 AM
Perfect Answer!!!
Thanks a lot, Bill !!!
Cheers,
Bala.
04-07-2010 07:37 AM
No problem. Glad to be of assistance.
Please remember to rate helpful responses and identify
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: