regular expression

Dear all

i got confusion about Regular expression

are it different

in

ASA

IOS

NBAR

or that same in the 3 item above

also

i got confusion about[]

it mean on character

or  many character

or it according to the followed character

like

+

?

so

what is the different between

[1-5]

[1-5]?

[1-5] +

 

also

[15]

[1,5]

Comments

  • See comments below:

    Dear all

    i got confusion about Regular expression

    are it different

    in

    ASA

    IOS

    NBAR

    or that same in the 3 item above -- Cisco uses regex operators that are similar to, but not exactly the same as the UNIX version of regex. I am most familiar with the regex used for AS-PATH filters in BGP in the Cisco world, but have worked with UNIX regex.

    also

    i got confusion about[]

    it mean on character

    or  many character

    or it according to the followed character

    like

    +

    ?

    so

    what is the different between

    [1-5]  -- This means one character that must be one of (1,2,3,4,5)

    [1-5]? -- This means zero or one character of (1,2,3,4,5)

    [1-5] + -- This means one or more character(s) of (1,2,3,4,5) (provided there is no space between ']' and '+'): [1-5]+

    also

    [15] -- This means one character that must be one of (1,5)

    [1,5] -- I am not sure where you would find this in the Cisco world...


Sign In or Register to comment.