> ^1239_ would match any route coming from AS1239 *including* routes
> originated in AS1239.  This is because the underscore can match any
> character including whitespace and the $ end-of-path anchor.
>

Probably work in show command but not in the IOS policy.  At the very least
the '^1239_' is very sloppy and not POSIX compliant, while '^1239 .*' is.

> ^1239 .* would match any route coming through AS1239 but *not* routes
> originated in AS1239.  This is presumably because I now have included a
> specific space between the ^1239 and the .*.  This will exclude ^1239$.
>

Actually '^1239 .*' would only match routes originated in AS1239.  ^1239$
would only match the single AS_PATH AS1239 exclusively and so would '^1239
.*'.

^1239$ means...  Matched string MUST start with a 1, then be proceeded by a
2, then proceeded by a 3, then proceeded with a 9 and end with a 9 to be
true.

'^1239 .*' means...  Matched string MUST start with a 1, then be proceeded
by a 2, then proceeded by a 3, then proceeded with a 9, then proceeded by 0
or more characters of any kind so AS1239 could be the only AS_PATH there.  I
am not sure how IOS processes the space as a litereal space or just a
seperator between AS's.  I had always thought IOS processed the AS_PATH as a
string of characters so the space may be counted but I think the '_' is what
forces the space to be counted as a space.

> ^1239_.+ behaves the same way as ^1239 .*.  This is because the + sign
> expects one or more repetitions of at least one character following
^1239_.
>

No it does not.  Remember * is 0 or more.  + is 1 or more.  Adding the +
means you must have at least one character of any kind while the * could be
empty.  Makes a HUGE difference depending on the string you are matchinig
against.


-Julian




Message Posted at:
http://www.groupstudy.com/form/read.php?f=7&i=24914&t=24460
--------------------------------------------------
FAQ, list archives, and subscription info: http://www.groupstudy.com/list/cisco.html
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

Reply via email to