📜  使用正则表达式 python 代码示例进行数组搜索

📅  最后修改于: 2022-03-11 14:45:08.096000             🧑  作者: Mango

代码示例1
import re

mylist = ["dog", "cat", "wildcat", "thundercat", "cow", "hooo"]
r = re.compile(".*cat")
newlist = list(filter(r.match, mylist)) # Read Note
print(newlist)