The space is the books. Because it said it match all the AS_paths that start
with 1 and of length 2, such as AS_path=1, =1 10, =1 200, etc. As you said,
? # 0 or 1 of the preceding characters (in this case a space). So if ?=0, it
is ^1[0-9]*$; if ?=1, it is ^1 [0-9]*$.
Do i misread your meaning?
"Drew Simonis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> ^1 ?[0-9]*$
> ^
> ^
>
> Is that space yours or the books? Broken apart, that regex matches
> (assuming standard egrep'ish metachars)
>
> ^ # beginning of line
> 1 # followed by the digit 1
> (space) # followed by a space
> ? # 0 or 1 of the preceding characters (in this case a space)
> [0-9] # a single digit within the range of 0-9
> * # 0 or more of the preceding characters, up to the end of
> # the pattern
> $ # end of line char
>
> So, is this equivalent to ^1[0-9]*$? I don't think so. Assuming
> that the pattern with a space was a typo, we are allowed an
> optional 1. Assuming it wasn't a typo, we are allowed the space
> character. Neither of these options would be matched by your more
> restrictive pattern. As for the specific pattern to match, you
> can't really say without knowing what you are matching with.
>
> Different regex engines support different metachars.
_________________________________
FAQ, list archives, and subscription info: http://www.groupstudy.com/list/cisco.html
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]