import re  
# 定义一个包含多个模式的正则表达式  
pattern = r"apple|banana|cherry"  
# 定义一个字符串列表  
fruits = ["apple", "banana", "orange", "cherry", "grape"]  
# 遍历字符串列表，检查每个字符串是否匹配  
for fruit in fruits:  
    if re.search(pattern, fruit):  
        print(f"{fruit} 匹配")  
    else:  
        print(f"{fruit} 不匹配")
