Appendix A Understanding Regular Expressions, Special Characters, and Patterns

Pattern Alternation

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

The order for matches using multipliers (*, +, and ?) is to put the longest construct first. Nested constructs are matched from outside to inside. Concatenated constructs are matched beginning at the left side of the construct. Thus, the regular expression matches A9b3, but not 9Ab3 because the letters are specified before the numbers.

Pattern Alternation

Alternation can be used to specify alternative patterns to match against a string. Separate the alternative patterns with a vertical bar (). Only one of the alternatives can match the string. For example, the regular expression codextelebit matches the string codex or the string telebit, but not both codex and telebit.

Anchor Characters

Anchoring can be used to match a regular expression pattern against the beginning or end of the string. Regular expressions can be anchored to a portion of the string using the special characters shown in Table A-3.

Table A-3

Special Characters Used for Anchoring

 

 

 

Character

 

Description

 

 

 

^

 

Matches the beginning of the string.

 

 

 

$

 

Matches the end of the string.

 

 

 

For example, the regular expression ^con matches any string that starts with con, and sole$ matches any string that ends with sole.

In addition to indicating the beginning of a string, the ^ can be used to indicate the logical function “not” when used in a bracketed range. For example, the expression [^abcd] indicates a range that matches any single letter, as long as it is not the letters a, b, c, and d.

Underscore Wildcard

Use the underscore to match the beginning of a string (^), the end of a string ($), parentheses (( )) , space ( ), braces ({}), comma (,), and underscore (_). The underscore can be used to specify that a pattern exists anywhere in the string. For example, _1300_ matches any string that has 1300 somewhere in the string and is preceded by or followed by a space, brace, comma, or underscore. Although _1300_ matches the regular expression {1300_, it does not match the regular expressions 21300 and 13000t.

The underscore can replace long regular expression lists. For example, instead of specifying ^1300( ) ( )1300$ {1300, ,1300, {1300} ,1300, (1300, simply specify _1300_.

Parentheses Used for Pattern Recall

Use parentheses with multiple-character regular expressions to multiply the occurrence of a pattern. IOS XR can remember a pattern for use elsewhere in the regular expression.

Cisco ASR 9000 Series Aggregation Services Router Getting Started Guide

 

A-4

OL-17502-01

 

 

 

Page 140
Image 140
Cisco Systems A9KMOD80TR Pattern Alternation, Anchor Characters, Underscore Wildcard, Parentheses Used for Pattern Recall

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.