[j-nsp] Regex

Saku Ytti saku at ytti.fi
Sun Nov 25 05:07:45 EST 2012


On (2012-11-25 20:26 +1100), Ali Sumsam wrote:

> Can anyone confirm, are regular expressions of Cisco exactly same as those
> in Juniper?

No. There is major difference, regexp atom in JunOS is ASN not
byte/char/digit. It may sound like simple difference, but I've found lot of
people with previous regexp people struggling to grasp it.
JunOS design decision is superior to any other implementation I've seen,
having ASN as atom makes perfect sense.

Consider you want to define private ASNs, in JunOS simple as [65412-65534],
in IOS horrible.

Study these examples
http://www.juniper.net/techpubs/software/junos/junos94/swconfig-policy/defining-as-path-regular-expressions.html

-- 
  ++ytti


More information about the juniper-nsp mailing list