IIUC Notes – Wildcards for Destination Patterns
As always, feel free to correct anything that needs correcting or add anything that needs adding. There is a lot more to the full definition of wildcards, but these are the basics. Note to *nix guys: This isn't regex as you understand it. Yes, the use of curly braces would be nice, but we don't get that here.
T: Represents anywhere from 0 to 32 digits
destination-patter 9T <- matches a 9 followed by 0 – 32 other digits
Period : Represents a single digit
destination-pattern 3… <- matches a 4-digit number that begins with a 3
destination-pattern 91802……. <- Matches a 12-digit number starting with 91802
Plus : Matches from 1 to 32 instances of the previous digit or pattern
destination-pattern 85+ <- matches an 8 followed by 1 to 32 5s
destination-pattern 1+ <- matches 1 to 32 instances of the digit 1
Percent or question mark : Matches from 0 to 32 instances of the previous digit or pattern
destination-pattern 74% <- matches a 7 followed by 0 to 32 4s
destination-pattern 84
Brackets : Matches a range or group of digits
destination-pattern [2-4]… <- matches a 4-digit number that begins with 2, 3, or 4
destination-pattern [159]… <- matches a 4-digit number that begins with 1, 5 or 9
Parenthesis : Groups digits together to match with a +, ?, or %
destination-pattern (61)+ <- matches 61, 6161, 616161…up to 32 61s
destination-pattern(555)+ <- matches 555, 555555…up to 32 555s
Remember to think about digit stripping if you're using these on POTS dial peers. The directive no digit-strip may help you out.
- Generating Network Diagrams from Netbox with Pynetbox - August 23, 2023
- Out-of-band Management – Useful Beyond Catastrophe - July 13, 2023
- Overlay Management - July 12, 2023
Don't forget that the brackets can also match specific numbers listed inside, not just ranges. For instance, destination-pattern 555[25] will match the patterns 5552 and 5555, but not 5553 or 5554. It's handy if you need to match a couple of phones in your dial plan across several sets of extensions, for instance the reception phone that always ends in '0' and the lobby phone that always ends in '4'.
Hey Aaron. Great content. I just posted all my IIUC notes on my blog. Here's the link: http://matthewberry.info/ciscovoiceguru/568/guru-guide-iiuc/
I hope that helps out.
You're right, Tom. I've gone back and added more examples to clear that up a bit.
Thanks for the link, Matthew. I'll definitely add your stuff to my study chest!