Negating: Matching Everything Except a Set of Characters

 

When a caret is used inside a bracket, it negates the range specified in the bracket . As a result, the regex matches on everything except the range. For example:

  ip as-path access-list 24 permit ^85[^0-5]$  

This filter looks like the preceding filter, with the exception of the added caret inside the bracket, signifying "not 0 “5." The regex will therefore match an AS_PATH with a single AS number in the range 856 “859.



Routing TCP[s]IP (Vol. 22001)
Routing TCP[s]IP (Vol. 22001)
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 182

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net