18 lines
458 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import re
test_text = """
xxxxxxxxxxxxxxxxx
附录: 投标人资质条件、能力和信誉(资格审查标准)
xxxxxx
附表一:招标文件澄清申请函
xxxxxxxxxxxxxxx
"""
pattern = r'^(?:附录(?:一)?[:]|附件(?:一)?[:]|附表(?:一)?[:]).*(?:资质|能力|信誉).*$'
match = re.search(pattern, test_text, re.MULTILINE)
if match:
print("匹配到的行:", match.group())
else:
print("没有匹配到符合条件的行")