RE: What is the difference between those two BGP regular

From: Simon Grace (SimonG@pcsystems.gr)
Date: Mon Nov 05 2007 - 10:03:21 ART


The first one will match the one AS or Two. Can do either quite happily
although you need a plus

^[0-9]+(_[0-9]+)?$ or it will only match a single digit AS.

The second one the ? will only effect the [0-9]

? one or none occurances.

Now this is the guess bit, I'm assuming that because you've got the _ in
brackets something has to happen, because you don't have the ? on the
outside of the brackets.

So the _ underscore can't be ignored-
Matches a comma (,), left brace ({), right brace (}), left parenthesis,
right parenthesis, the beginning of the input string, the end of the
input string, or a space.

Sorry first post was a mistake, short cut key gone wrong, sent the mail
before I had finished.

Cheers,

Simon.

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
CCIE
Sent: Monday, November 05, 2007 2:22 PM
To: ccielab@groupstudy.com
Subject: What is the difference between those two BGP regular
expressions?

What is the difference between those two BGP regular expressions?

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

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

 

Regards,

Amin



This archive was generated by hypermail 2.1.4 : Sat Dec 01 2007 - 06:37:28 ART