题解 | 字符串通配符
import sys import re a0=input().lower() b=input().lower() a='' flag=0 for i in range(len(a0)): c=a0[i] if(c=='*'): if(flag): while(a0[i]=='*'): i+=1 i-=1 else: a+='*' flag=1 else: flag=0 a+=c # print(a) a1='^'+a.replace('*','[a-z0-9]*').replace('?','[a-z0-9]')+'$' if(re.match(a1,b)): print('true') else: print('false')