GroupStudy.com GroupStudy.com - A virtual community of network engineers
 Home  BookStore  StudyNotes  Links  Archives  StudyRooms  HelpWanted  Discounts  Login
Re: Regular Expressions posted 09/12/2006
[Chronological Index] [Thread Index] [Top] [Date Prev][Date Next] [Thread Prev][Thread Next]


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@xxxxxxxxxxxxxx [mailto:nobody@xxxxxxxxxxxxxx] On Behalf Of
Fabio Rodrigues
Sent: 12 September 2006 16:12
To: ccielab@xxxxxxxxxxxxxx
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