Translation rules problem

I need some explanation with this problem:

rule 1 /\(.*\)3828$/ /\13434/

Dialed string is 2234853828

The replaced string value says 2234853434


The 3828 in the dialed string is missing; is this because in the rule, the 3828 is followed by the "$" sign? If so, does a $ sign erase everything in that number slice - so the 3828 at the end of the dialed string would disappear?

I'm also having trouble with (.*) Here, would the "*" have to be one or more of the same digit as "."? So if it was applied to, say, 222134, the 222 would be replaced with something else?
"Computers in the future may weigh no more than 1.5 tons." - Popular Mechanics, 1949

Comments

  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    The DOT/ASTERISK is a wildcard combination (from the chart I linked in your previous translation rules question post)
    Any digit followed by none or more occurrences. This is effectively anything, including null.
    

    Looking at the match --
    match a string that ends with 3828
    and save any and all digits preceding the 3828 in match save string 1

    The Replace says --
    The \1 says to put the 1st saved string from the match here -- so that's the 223485
    Then append 3434 to the end

    If you tried this with 3828 as the input dialed string, you'd get 3434 as the result string.
    :mike: Cisco Certifications -- Collect the Entire Set!
  • CrunchyhippoCrunchyhippo Member Posts: 389
    I'm hooking up my equipment at home so I can practice this to my heart's content. I'm going to have fun all night long. It beats the party life any day.
    "Computers in the future may weigh no more than 1.5 tons." - Popular Mechanics, 1949
Sign In or Register to comment.