rule 38 name SRM202307100275-2
action drop
disable
logging enable
counting enable
description 限制非 sjyh01用户访问
source-zone Trust
destination-zone Untrust
destination-ip 1.1.2.1
service icmp_any
service tcp_20060
rule 36 name cy_test
action pass
disable
logging enable
counting enable
source-zone Trust
destination-zone Untrust
source-ip ip_192.168.232.214
service http
service ssh
service icmp_any"""
rule_names = re.findall(r"rule \d+ name ([^\n]+)(?=\n action)", text)
filtered_rule_names = [name for name in rule_names if re.search(r"service telnet|service ssh|service tcp_3389", text)]