Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Wildcard Matching
Bookmark
Input
Example 1 (false)
Example 2 (true)
Example 3 (false)
Example 4 (true)
Custom
s
=
aa
,
p
=
a
s =
"aa"
p =
"a"
?
one,
*
any run
pattern (j)
s (i)
0
1
∅
a
0
1
2
∅
a
a
F
F
F
F
F
F
does "aa" match "a"? the whole string, not a substring
algo
master
.
io
Step:
Does "aa" match the pattern "a"? (? = any char, * = any run)
0 / 6
Input
Example 1 (false)
Example 2 (true)
Example 3 (false)
Example 4 (true)
Custom
s
=
aa
,
p
=
a
0 / 6
s =
"aa"
p =
"a"
?
one,
*
any run
pattern (j)
s (i)
0
1
∅
a
0
1
2
∅
a
a
F
F
F
F
F
F
does "aa" match "a"? the whole string, not a substring
algo
master
.
io
Step:
Does "aa" match the pattern "a"? (? = any char, * = any run)