Regular Expression Matching
Screen Shot 2019-01-05 at 10.22.23 PM.png Screen Shot 2019-01-05 at 10.22.29 PM.pngclass Solution:
def isMatch(self, s, p):
"""
:type s: str
:type p: str
:rtype: bool
"""
if re.compile('^'+p+'$').match(s):
return True
return False
网友评论