Skip to content

Commit

Permalink
Update wildcard-matching.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyu104 committed May 2, 2015
1 parent 8d93982 commit e8db313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/wildcard-matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def isMatch(self, s, p):
return not s and not p

if p[0] != '*':
if not s or (p[0] == s[0] or p[0] == '?'):
if p[0] == s[0] or p[0] == '?':
return self.isMatch(s[1:], p[1:])
else:
return False
Expand Down

0 comments on commit e8db313

Please sign in to comment.