[nsp] regexp question

rasmus (posts) lom at doruk.net.tr
Tue Apr 6 10:38:58 EDT 2004


Hi Peter,

This should work fine,

^(1234_)+([0-9]+_)+$

Explanation

^(1234_)+    # this accepts 1234 AS with any prependings
([0-9]+_)+$  # this accepts any ASNs with any prependings also,


Please tell the result after a try,

Good luck
 
Regards,

Levent Ogut 

> -----Original Message-----
> From: cisco-nsp-bounces at puck.nether.net 
> [mailto:cisco-nsp-bounces at puck.nether.net] On Behalf Of Peter L
> Sent: Tuesday, April 06, 2004 1:05 PM
> To: cisco-nsp at puck.nether.net
> Subject: [nsp] regexp question
> 
> Hi
> I have a question regarding a regular expression I'm trying 
> to fix and hopefully someone that's excellent at regular 
> expressions can help me. I would like to accept everything 
> from a peer + everyting from the ASs his peering with 
> directly. Example:
> Accept:
> 1234 1234
> 1234 567
> 1234 1234 655
> 1234 654 654
> Deny:
> 1234 654 989
> or
> 1234 567 567 2323
> ando so forth..
> So far I have:
> ^(1234_)+([0-9]+)*$
> This accepts everthing except when the second AS is 
> prepended(1234 654 654).
> Is i possible to fix this in one expression? Otherwise I have 
> to setup filters for every AS and that would not be very dynamic.
> 
> Thank you
> Peter
> 
> _______________________________________________
> cisco-nsp mailing list  cisco-nsp at puck.nether.net 
> https://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/
> 



More information about the cisco-nsp mailing list