AI, ML, Development + Cisco Learning Blog Learning about Machine Learning, Artificial Intelligence, related devlopment topics and formerly Routing and Switching, Datacenter, Security and other topics, CCIE #23664, Frank Wagner

5. September 2006

regular expressions

Filed under: BGP — ocsic @ 06:12

^ Start of string

$ End of string

[] Range of characters

– Used to specify a range (i.e. [a-z])

() Local grouping

. Any single character

* Zero or more instances

+ One ore more instances

? Zero or one instance

\ the \ matches the charcter

– Comma, open or clase brace, open or close paranthese, start or end of string, or space

Some examples matches:

.* Anything

^$ Local originated routes

^200_ Learned from AS 200

_200$ Originated in AS 200

_100_ Any instance of AS 100

^[0-9]+(_[0-9])?$ Directly connected AS’s and their customers

^\(.*\)$ Routes originated in confederation peers

^(\(.*\))?$ Locally originated and/or routes originated in confederation peers

Keine Kommentare »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress