题解 | #字符串通配符#

字符串通配符

https://www.nowcoder.com/practice/43072d50a6eb44d2a6c816a283b02036

import re
res = input()
ps = input()
res = res.replace(".", "\.").replace("?", "[a-z0-9]{1}").replace("*", "[a-z0-9]*")
print(str(bool(ps in re.findall(res,ps,re.I))).lower())

全部评论

相关推荐

北漂的牛马人:211佬,包进的,可能是系统问题
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务