+ Reply to Thread
Results 1 to 5 of 5
  1. Member
    Join Date
    Feb 2009
    Location
    Scotland
    Posts
    33
    #1

    Default + and % as regular expression in IOS question

    so I wonder about the following .+ -- would be any standard dtmf character and then repeated one or more time so .+ could be 00000 or 11111 or 111however, could .+ be 012323 or 32342 etc? or if the dot is 1 then it has to be one or more of instances of 1, if the dot is 2 then it has to be one or more instances of 2 etc .% - could it be 01 or 02 or 012 or 123 etc. So do the digits represented by % have to be the same as the digit matched by . sign? #Thanks
    Reply With Quote Quote  

  2. SS -->
  3. Senior Member
    Join Date
    May 2004
    Location
    Milwaukee, WI
    Posts
    441

    Certifications
    CCNA CCNA Voice CCNP (+CSPFA, QoS, & CCIE R&S written), MCSA/MCSE on Win2k , Network+, Security+.
    #2
    It would match any string, not just repeats of a single digit.

    Cisco IOS Voice, Video, and Fax Configuration?Guide, Release?12.2 - Configuring Dial Plans, Dial Peers, and Digit Manipulation [Cisco IOS Software Releases 12.2 Mainline] - Cisco

    Normally I prefer a more exact match, it lessens the likelihood of mistakes. If you need to match any terminating string, like a single dial peer for anything starting in 9, Cisco provides "T" so your dial peer would match "9T".
    Reply With Quote Quote  

  4. Member
    Join Date
    Feb 2009
    Location
    Scotland
    Posts
    33
    #3
    thanks for replying. So can you confirm that if you do under dial-peer destination pattern .+ordestination pattern .Tboth would match any string that you will dial (well almost any as .+ would need at least two digits whereas .T would match 1 digit too)?Thanks
    Reply With Quote Quote  

  5. Senior Member
    Join Date
    May 2004
    Location
    Milwaukee, WI
    Posts
    441

    Certifications
    CCNA CCNA Voice CCNP (+CSPFA, QoS, & CCIE R&S written), MCSA/MCSE on Win2k , Network+, Security+.
    #4
    Either one (.+ or .T)will match anything over a single digit. .T seems to be the more "standard" way to do it, and the way I would stick with.
    Reply With Quote Quote  

  6. Member
    Join Date
    Feb 2009
    Location
    Scotland
    Posts
    33
    #5
    ok, thank you.
    Reply With Quote Quote  

+ Reply to Thread

Social Networking & Bookmarks