by Tony Mattke on May 16, 2010
As a followup to my previous post on Regular Expression Basics, I wanted to give a few examples on using them on Cisco IOS. Obviously, with a topic as large as regular expressions, there are a limited number of examples I can give. You imagination and of course necessity are the best tools you have for exploring them on your own.
Our first examples use Regular Expressions (regexes) on the CLI. Every engineer should know that you can pipe output from the cli and run it through filters, including exclude, include, section, and begin. These can be very handy when you’re looking for specific information.
[ read more... ]
by Tony Mattke on June 4, 2009
Before I even get started, I want to mention that not all regular expression metacharacters are supported in every application. Keep this in mind when building your matches.
Regular expressions are made up of normal characters and metacharacters. Normal characters include upper and lower case letters and numerals. The metacharacters have special meanings and can match any number of things.
In the simplest case, a regular expression looks like a standard search string. For example, the regular expression “test” contains no metacharacters. It will match “test” and “test123″ but it will not match “Testing123″. Metacharacters help solve these simple dilemas, here is a table of such characters.
[ read more... ]
Recent Comments