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

Michael Hallgren m.hallgren at free.fr
Wed Jul 13 10:33:08 EDT 2011


Le mercredi 13 juillet 2011 à 15:15 +0100, Alexander Frolkin a écrit :
> 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)*
> 
> ?

No, in AS-path context, ASNs are the atoms (thus (.) above).

> 
> This works with egrep:
> 
>   $ echo 123 123 | egrep '^([0-9]*)( \1)*$'
>   123 123
>   $ echo 123 124 | egrep '^([0-9]*)( \1)*$'
>   $
> 

Yes.



mh

> 
> Alex
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://puck.nether.net/pipermail/juniper-nsp/attachments/20110713/b6cbfb01/attachment.pgp>


More information about the juniper-nsp mailing list