Regular Expression Examples
Table 6 on page 47 lists some representative regular expressions that you might use
in an AS-path access list or community list, along with sample attribute values that
match or do not match the regular expression.
Table 6: Sample Regular Expressions
Example
Matched AS-Path or Community
Attribute
Regular
Expression
12 23 4212 629
121245 19
but not
58 12 7
Begins with 12
^12
44 73 465 69
8
but not
1145 1912
2 49
Includes any numeral except 1 or 2
[^12]
89 611 305305
42 30519 1305
6666:305
Ends with 305
305$
89 611 3533 252 12 998
600:500
Includes any one character followed by
the numeral 5
.5
179 35 2433 252 129 48
2129 14600:2129
321:94
Includes a sequence of three characters,
where the first character is numeral 1
and the third character is numeral 9
1.9
Includes any character; matches all AS
paths and community lists
.*
67 42 51314
33 252 422 483142
4 339 7831422
Includes a number that has a numeral
4 followed by
zero or more
instances of
the numeral 2
42*
137 42 211373737 29 4
1
but not
4 3737 78
Includes a sequence that has a numeral
1 followed by
zero or more
instances of
the pattern 37
1(37)*
67 42 2133 252 422 48
but not
4 329 78
Includes a number that has a numeral
4 immediately followed by
one or more
instances of the numeral 2
42+
Using Regular Expressions
■
47
Chapter 1: Configuring Routing Policy
Summary of Contents for IP SERVICES - CONFIGURATION GUIDE V 11.1.X
Page 6: ...vi...
Page 8: ...viii JUNOSe 11 1 x IP Services Configuration Guide...
Page 18: ...xviii Table of Contents JUNOSe 11 1 x IP Services Configuration Guide...
Page 20: ...xx List of Figures JUNOSe 11 1 x IP Services Configuration Guide...
Page 22: ...xxii List of Tables JUNOSe 11 1 x IP Services Configuration Guide...
Page 28: ...2 Chapters JUNOSe 11 1 x IP Services Configuration Guide...
Page 138: ...112 Monitoring J Flow Statistics JUNOSe 11 1 x IP Services Configuration Guide...
Page 286: ...260 Monitoring IP Tunnels JUNOSe 11 1 x IP Services Configuration Guide...
Page 312: ...286 Monitoring IP Reassembly JUNOSe 11 1 x IP Services Configuration Guide...
Page 357: ...Part 2 Index Index on page 333 Index 331...
Page 358: ...332 Index JUNOSe 11 1 x IP Services Configuration Guide...