[j-nsp] Back-reference in JunOS regular expressions

Alexander Frolkin avf at eldamar.org.uk
Wed Jul 13 10:15:33 EDT 2011


Hi,

> Is back-reference, like (.)( \1)*$, provided by the JunOS AS-path
> matching engine? (This should match, for instance, ^6453$, ^6453_6453$,
> ^6453_6453_6453$, and so on...)

Never tried this, but do you mean something like

  ([0-9]*)( \1)*

?

This works with egrep:

  $ echo 123 123 | egrep '^([0-9]*)( \1)*$'
  123 123
  $ echo 123 124 | egrep '^([0-9]*)( \1)*$'
  $


Alex



More information about the juniper-nsp mailing list