This appendix explains regular expressions and how to use them in Cisco IOS software configurations. It also provides 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 are 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. When the destination address string matches 3107 pattern, then pattern matching succeeds and the Cisco IOS software routes the packet to serial interface 0. If a regular expression can match two different parts of an input string, it will match the earliest part first.