1. Check
This rule indicates that a match contains both "traffic classifier + any characters" and "traffic behavior + any characters", or does not contain "interface GigabitEthernet X/X/X", where "X" indicates a number.
No. | Rule relation | Match mode | Rule content |
1 | Contain | traffic classifier .* | |
2 | and | Contain | traffic behavior .* |
3 | or | Not contain | interface GigabitEthernet\d/\d/\d |
2. Check
- Match patterns
acl number (?<ACL Number>[0-9]{4})
In a regular expression, a pair of parentheses introduces a sub-expression (that is, a group), and the ?<> combination that follows the left parenthesis defines the group name, which can contain only A-Z or a-z or 0-9 or blank letters. If you specify no group name for a group, the system will assign one for the group.
In this example, <ACL Number>[0-9]{4} is the only group, and ACL Number is the name of the group. [0-9]{4} indicates that four digits should be abstracted. The whole expression indicates that the system gets the four digits following ACL Number, and displays ACL Number as the group name.- Configuration segment
#
telnet server enable
#
acl number 2001
rule 0 permit
#
acl number 2000
rule 0 permit source 5000::6/96
#
domain system
access-limit disable
idle-cut disable
self-service-url disable
#
This segment contains "acl number 2001" and "acl number 2000" which meet the rule requirements.Related Topics