Appendix A Understanding Regular Expressions, Special Characters, and Patterns

Multiple-Character Patterns

F I N A L D R A F T — C i s c o C o n f i d e n t i a l

Multiple-Character Patterns

Multiple-character regular expressions can be formed by joining letters, digits, and keyboard characters that do not have a special meaning. With multiple-character patterns, order is important. The regular expression a4% matches the character a followed by a 4 followed by a %. If the string does not have a4%, in that order, pattern matching fails.

The multiple-character regular expression a. uses the special meaning of the period character to match the letter a followed by any single character. With this example, the strings ab, a!, and a2 are all valid matches for the regular expression.

Put a backslash before the keyboard characters that have special meaning to indicate that the character should be interpreted literally. Remove the special meaning of the period character by putting a backslash in front of it. For example, when the expression a\. is used in the command syntax, only the string a. is matched.

A multiple-character regular expression containing all letters, all digits, all keyboard characters, or a combination of letters, digits, and other keyboard characters is a valid regular expression. For example: telebit 3107 v32bis.

Complex Regular Expressions Using Multipliers

Multipliers can be used to create more complex regular expressions that instruct Cisco IOS XR software to match multiple occurrences of a specified regular expression. Table A-2lists the special characters that specify “multiples” of a regular expression.

Table A-2

Special Characters Used as Multipliers

 

 

 

Character

 

Description

 

 

 

*

 

Matches 0 or more single-character or multiple-character patterns.

 

 

 

+

 

Matches 1 or more single-character or multiple-character patterns.

 

 

 

?

 

Matches 0 or 1 occurrences of a single-character or multiple-character pattern.

 

 

 

The following example matches any number of occurrences of the letter a, including none:

a*

The following pattern requires that at least one occurrence of the letter a in the string be matched:

a+

The following pattern matches the string bb or bab:

ba?b

The following string matches any number of asterisks (*):

\**

To use multipliers with multiple-character patterns, enclose the pattern in parentheses. In the following example, the pattern matches any number of the multiple-character string ab:

(ab)*

As a more complex example, the following pattern matches one or more instances of alphanumeric pairs:

([A-Za-z][0-9])+

Cisco ASR 9000 Series Aggregation Services Router Getting Started Guide

 

OL-17502-01

A-3

 

Page 139
Image 139
Cisco Systems A9K24X10GETR Multiple-Character Patterns, Complex Regular Expressions Using Multipliers, Ba?b, Za-z0-9+

A9KMOD80TR, A9K24X10GETR, ASR 9000 specifications

Cisco Systems has long been a leader in networking technology, providing cutting-edge solutions for service providers and enterprise organizations alike. Among their standout products is the Cisco ASR 9000 Series Aggregation Services Routers, notably the A9K24X10GETR and the A9KMOD80TR models. These routers are engineered to deliver unmatched performance, scalability, and versatility for networks that require high bandwidth and low latency.

The Cisco ASR 9000 Series is built for the needs of today's complex service provider and enterprise networks. A significant feature of the A9K24X10GETR is its 24-port 10-Gigabit Ethernet module. This functionality allows for high-density connectivity, making it ideal for aggregating numerous connections to different parts of a network while maintaining optimal performance. Whether used for Internet service providers delivering high-speed connectivity or for enterprises looking to connect multiple branches, the A9K24X10GETR provides robust and reliable data transmission.

Further enhancing the capabilities of the ASR 9000 is the A9KMOD80TR module, which supports an extensive range of services. This module is designed to run a variety of technologies, including Layer 2 and Layer 3 services, MPLS (Multiprotocol Label Switching), and IPv6. Its ability to integrate seamlessly into existing infrastructures while providing the advanced features customers demand makes it an invaluable asset for network engineering teams.

Another cutting-edge technology present in the ASR 9000 Series is its support for eBGP (External Border Gateway Protocol), which plays a critical role in managing traffic across multiple networks. The routers are equipped with advanced telemetry features, empowering operators with real-time insights into network performance and health. Additionally, they come with integrated security features that protect against DDoS threats and other vulnerabilities.

In summary, Cisco's ASR 9000 Series, particularly the A9K24X10GETR and A9KMOD80TR, combines high-density connections, extensive service support, and advanced security and telemetry capabilities. These routers are perfect for demanding environments where reliable performance and adaptability are crucial. With their focus on innovation and performance, Cisco continues to shape the future of networking technology.