From: John Elias (jelias_@hotmail.com)
Date: Mon Jul 12 2004 - 10:22:16 GMT-3
Got this from a 'Mastering Reguluar Expressions' Book.
Table 1-2: Summary of Quantifier ``Repetition
Metacharacters''
Minimum Maximum
Required to Try
Meaning
? none 1 one
allowed; none required (``one optional'')
* none no limit
unlimited allowed; none required (``any amount optional'') + 1
no limit one required; more
allowed (``some required'')
John E.
CCIE #8150
>From: "Joe Deleonardo" <Joe_Deleonardo@hotmail.com>
>Reply-To: "Joe Deleonardo" <Joe_Deleonardo@hotmail.com>
>To: "'group study'" <ccielab@groupstudy.com>
>Subject: BGP Regular Expression - logic help
>Date: Sun, 11 Jul 2004 17:09:33 -0700
>
>Hi,
>
>According to what I've read
>
>* = 0 or more
>+ = 1 or more
>? = 0 or 1
>
>Taken from:
>http://www.cisco.com/univercd/cc/td/doc/product/atm/c8540/12_0/13_19/cmd_ref
>/appc.htm#1003249
>
>
>Then I see this example - taken from
>http://www.cisco.com/warp/public/459/26.html#t5
>
>^4_[0-9]*$ = AS 4 and it's directly attached ASs
>
>It seems like this should match 4 or 4 + any AS (1 or more times) - in
>other
>words to me this seems the same as this expression ^4 .*
>
>The * seems to mean any number of occurrences >= 0
>
>In other words, to me at least it seems like it should match 4 or 4 x or 4
>x
>y... etc.
>
>It seems like ^4_[0-9]?$ would be what we should use to get "Only Networks
>Originated from AS 4, and ASs Directly Attached to AS 4" No?
>
>
>So what do you guys think? Am I over thinking this? Yes ^4_[0-9]*$ will get
>you what you want but it seems like, you'll also get more then AS 4 and
>it's
>directly attached networks.
>
>You know if I had the choice of Cisco improving on any one thing - this
>would be it. There's got to be an easier way to catch this mouse.
>
>Thanks in advance!
>
>Joe
>
>[GroupStudy removed an attachment of type application/ms-tnef which had a
>name of winmail.dat]
>
>_______________________________________________________________________
>Please help support GroupStudy by purchasing your study materials from:
>http://shop.groupstudy.com
>
>Subscription information may be found at:
>http://www.groupstudy.com/list/CCIELab.html
This archive was generated by hypermail 2.1.4 : Sun Aug 01 2004 - 10:11:52 GMT-3