Re: A matter of a regular Expression

From: Cyrus <cyrus.mgh_at_gmail.com>
Date: Mon, 13 Apr 2009 17:07:47 +1000

Hey,

Basically they are same.In that ,different approaches

 ^100(_[0-9]+)?$ use "?" to for zero or 1 occurrence for whole expression
of [0-9]+ for 1 or more occurrences and

u use ^100_[1-9]*$ , "*" as zero or more occurrences

On Mon, Apr 13, 2009 at 4:54 PM, <aly.groupstudy_at_gmail.com> wrote:

> Hello all,
>
> I was working on a task asking to accept only BGP updates from AS100 and
> its
> directly connected AS
>
> Solution guide makes use of this regular expression ^100(_[0-9]+)?$
>
> I used a simpler different solution ^100_[1-9]*$
>
> I think my solution seems to work.
>
> Can anyone confirm the difference between the 2 methods used and if one has
> any
> advantage over the other
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
>
>
>
>
>
>

-- 
Sirus Moghadasian
CCIE #21862 (R&S)
Blogs and organic groups at http://www.ccie.net
Received on Mon Apr 13 2009 - 17:07:47 ART

This archive was generated by hypermail 2.2.0 : Mon May 04 2009 - 07:39:11 ART