This appendix explains what regular expressions are and how you use them in router configurations. It also gives you details for composing regular expressions. A regular expression is a pattern to match against an input string. You specify the pattern that a string must match when you compose a regular expression.
Pattern matching either succeeds or fails.
For example, you can specify in an X.25 routing table that incoming packets with destination addresses beginning with 3107 get routed to serial interface 0. In this example, the pattern to match is the 3107 specified in the X.25 routing table. The string is the initial portion of the destination address of any incoming X.25 packet. If a regular expression can match two different parts of an input string, it will match the earliest part first. Using Regular Expressions There are several implementations of regular expressions in Cisco router configurations.