RE: Regular Expressions

From: Scott Morris (swm@emanon.com)
Date: Sat Jan 10 2004 - 23:03:01 GMT-3


Because you are looking for an arbitrary string match. I'm giving you a
string (large set) and you are looking for whatever value, and the answer is
yes or no. If I send you a string of "100 200 500 900" and you are looking
to see whether the value matches "900", then the answer is NO.

That's why you need regular expressions because the coded logic to look for
string matches isn't exactly like a ^F in Internet Explorer. :)

Without getting into the coding 'n' stuff, I hope that helps put it in
perspective for you! You need to have the exciting wildcards and other
funky characters as well. They're the kind of thing that give you config a
personality!

HTH,

 
Scott Morris, CCIE4 (R&S/ISP-Dial/Security/Service Provider) #4713, CISSP,
JNCIS, et al.
IPExpert CCIE Program Manager
IPExpert Sr. Technical Instructor
swm@emanon.com/smorris@ipexpert.net
http://www.ipexpert.net
 

-----Original Message-----
From: Michael Snyder [mailto:msnyder@revolutioncomputer.com]
Sent: Saturday, January 10, 2004 8:51 PM
To: ccielab@groupstudy.com
Cc: 'Scott Morris'
Subject: RE: Regular Expressions

How about just 900 with no wildcards.

Why match the beginning of the string or a whitespace when we know the
exactly what the beginning of the string would be with a plain 900 from a
directly connected neighbor.

Wonder if the IOS is smart enough the realize that 900<space> doesn't equal
9000 etc.

   

-----Original Message-----
From: Scott Morris [mailto:swm@emanon.com]
Sent: Saturday, January 10, 2004 4:29 PM
To: 'Nathasha Aleyevka'; ccielab@groupstudy.com
Subject: RE: Regular Expressions

Or ^900_ will suffice. :)

  _____

From: Nathasha Aleyevka [mailto:naleyevka@yahoo.com]
Sent: Saturday, January 10, 2004 5:18 PM
To: Scott Morris; ccielab@groupstudy.com
Subject: RE: Regular Expressions

Scott,
 so if I want to filter all prefixes learned from AS 900
would this satisfy the requirement
^900_[0-9]*$
Thanks again

Scott Morris <swm@emanon.com> wrote:

Your first one there matches all prefixes ORIGINATING in AS 900 (that
will
be the end of the string, or the oldest AS).

Your third one, I'm not entirely sure what it accomplishes other than
going
through SOMETHING! :)

Your last one, you have to remember that the _ character represents a
comma,
{, }, (, ), beginning, end or space within a string. For AS paths, we
primarily think of this as the space between AS numbers in the path. So
you
are mathing something transiting 99 and 0 or 1 other AS, but originating
from 75. Not the last two digits of 75, but 75 itself.

If you had the last string as ...75 (since 5 characters is the max set
anyway), then that would be great for anything ending in 75. But the
"(_|_.*_)" refers to the single space or anything within that one AS set
(between spaces). If you wanted to have it pass through multiple (as
many
as necessary) systems, you woul duse the "(_|_.*_)*" instead. That * on
the
outside of the parentheses treats the entire thing as a "0 or more of"
match.

Regurlar expressions are enough to make your brain hurt. :)

Scott Morris, CCIE4 (R&S/ISP-Dial/Security/Service Provider) #4713,
CISSP,
JNCIS, et al.
IPExpert CCIE Program Manager
IPExpert Sr. Technical Instructor
swm@emanon.com/smorris@ipexpert.net
http://www.ipexpert.net

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Nathasha Aleyevka
Sent: Saturday, January 10, 2004 4:46 PM
To: ccielab@groupstudy.com
Subject: Regular Expressions

Hi,
I have created the following 4 REs:
Would you please go over'em and advise me:

1) _900$ matches all the prefixes learned from BB1(900)

2) _500_ matches all the prefixes which transited AS500 :

3) _|.* any neighbor or AS using my terms

4) _99(_|_.*_)75$ matches any path that goes through AS99 and ends
with an AS# whos the last 2 digits are 75

I used the infot from
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/
fdia
l_c/fnsprt13/dafaapre.htm

Thank you very much
Nathasha

---------------------------------
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes



This archive was generated by hypermail 2.1.4 : Mon Feb 02 2004 - 09:07:39 GMT-3