Using Metacharacters As Literal Tokens - Juniper IP SERVICES - CONFIGURATION GUIDE V 11.1.X Configuration Manual

Ip services configuration guide
Table of Contents

Advertisement

JUNOSe 11.1.x IP Services Configuration Guide
Table 5: Supported Regular Expression Metacharacters (continued)

Using Metacharacters as Literal Tokens

You can remove the special meaning of a metacharacter by preceding it with a
backslash (\). Such a construction denotes that the metacharacter is not treated as a
metacharacter for that regular expression. It is simply a character or token with no
special meaning, just as a numeral has no special meaning. The backslash applies
only to the character immediately following it in the regular expression.
On an E Series router, you are likely to use the backslash only for the parentheses
characters, ( or ). BGP indicates a segment of an AS path that is of type AS-confed-set
or AS-confed-seq by enclosing that segment with parentheses.
The following AS-path access list uses a regular expression to match routes that have
Example
an AS-path attribute that begins with any AS-confed-set or AS-confed-seq:
The following AS-path access list uses a regular expression to match routes that have
an AS-path attribute that ends with any AS-confed-set or AS-confed-seq:
The following AS-path access list uses a regular expression to match routes that have
an AS-path attribute that includes the specific AS-confed-set or AS-confed-seq, (100
200):
46
Using Regular Expressions
Metacharacter
Description
?
Matches zero or one sequence of the immediately previous character or
pattern.
()
Specifies patterns for multiple use when followed by one of the multiplier
metacharacters: asterisk (*), plus sign (+), or question mark (?).
[ ]
Matches any enclosed character; specifies a range of single characters.
– (hyphen)
Used within brackets to specify a range of AS or community numbers.
_ (underscore)
Matches a ^, a $, a comma, a space, a {, or a }. Placed on either side of a
string to specify a literal and disallow substring matching. Numerals enclosed
by underscores can be preceded or followed by any of the characters listed
above.
|
Matches characters on either side of the metacharacter; logical OR.
host1(config)#ip as-path access-list 1 permit ^\(
host1(config)#ip as-path access-list 1 permit \)$
host1(config)#ip as-path access-list 1 permit \(100 200\)

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the IP SERVICES - CONFIGURATION GUIDE V 11.1.X and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Junose 11.1.x ip servicesJunose v 11.1

Table of Contents