RE: Regular Expressions

From: Peter Cresswell (p-cresswell@iname.com)
Date: Tue Sep 12 2006 - 13:29:55 ART


Yeah I think that's what I meant, just without a real world example.

expression 1 would be:
Matches routes that have been learnt from AS 100 but could have originated
anywhere except AS 100 (unless route included pre-pending).

Expression 2 would be:
Matches routes that have been learnt from AS 100 and have originated from an
AS directly connected to AS 100 (e.g. AS YOU-----AS100------AS200), but
not routes that are more than 2 as hops away (e.g. not match AS
YOU----AS100----AS200---AS3000).

I think that is a better explanation than my first attempt :-)

Peter

-----Original Message-----
From: Heiko Liedtke [mailto:heiko.liedtke@gmx.net]
Sent: 12 September 2006 17:19
To: Peter Cresswell
Cc: 'Fabio Rodrigues'; ccielab@groupstudy.com
Subject: Re: Regular Expressions

Sorry,

but I think that bouth of you are wrong...

First Expression

^100(_[ 0-9]+)?$

This matches all paths coming from AS100 and have or have not originated in
another AS. This means, that the paths could have originated in AS100

e.g.
100 999
100 1
100 546
100

Second Expression

^100_[0-9]*$

This matches all paths coming from AS100 and have originated in another AS.
This means, that the paths could not have originated in AS100

e.g.
100 999
100 1
100 5456

Regards

Heiko

Peter Cresswell schrieb:

>Fabio,
>
>The difference is the bottom one will match multiple as's in an as path
>becoase the _ is also allowed to be repeated. The 2nd one will only
>match "100 " then a list of digits between 0-9 without any spaces.
>
>
>E.g.
>
>Expression 1 would match:
>100 200 300 111
>
>Expression 2 would match:
>
>100 200300111
>
>Regards,
>
>Peter
>
>-----Original Message-----
>From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
>Fabio Rodrigues
>Sent: 12 September 2006 16:12
>To: ccielab@groupstudy.com
>Subject: Regular Expressions
>
>Hi All,
>
>does anyone knows to say the difference of the effect (if exists) of
>these two regular expressions?
>
>^100(_[ 0-9]+)?$
>^100_[0-9]*$
>
>
>Tks,
>
>
>Fabio.
>
>_______________________________________________________________________
>Subscription information may be found at:
>http://www.groupstudy.com/list/CCIELab.html
>
>_______________________________________________________________________
>Subscription information may be found at:
>http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Sun Oct 01 2006 - 16:55:40 ART