Visual Studio 2019中的添加控制器显示错误。
import re
regex = r"(^\d+:(.*)[\r\n](.*))(?=^\d+:|$)"
test_str = """
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp7s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
link/ether f0:76:1c:35:7b:76 brd ff:ff:ff:ff:ff:ff
3: wlp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
link/ether ac:b5:7d:0f:2d:6b brd ff:ff:ff:ff:ff:ff
"""
print(re.findall(regex, test_str, re.M))
答案 0 :(得分:1)
您的web.config文件可能已在编辑器中打开。 请关闭web.config文件,然后重试