Regular Expression Fun

From: Brian McGahan (brian@xxxxxxxxxxxxxxx)
Date: Fri Jun 21 2002 - 03:00:22 GMT-3


   
Groupmembers,

        I have an interesting teaser, and hopefully it will spawn a
useful thread. I was making one of my students play with regular
expressions today, and I asked him to create a regexp that matches
routes learned from AS 10, which have originated in AS 100. I came up
with: ^10_(|.*_)100$

My logic being

^10_ learned from 10, space
(|.*_) nothing, or something that ends in a space
100$ originated from AS 100

My logic may be off. This is why I gave up programming ;)

Brian McGahan, CCIE #8593
Director of Design and Implementation
brian@cyscoexpert.com

CyscoExpert Corporation
Internetwork Consulting & Training
http://www.cyscoexpert.com
Voice: 847.674.3392
Fax: 847.674.2625



This archive was generated by hypermail 2.1.4 : Tue Jul 02 2002 - 08:12:39 GMT-3