How come this test case is true ?
as . will get matched to 'a' and then * as the description says, Matches zero or more of the preceding element. In this case that is 'a'(previously matched character), so '*' shouldn't get matched to b at all.
isMatch("aa", ".*") = true, this test case makes the right sense, I believe.
As far as I understand '*' after dot '.' indicates zero or more '.'. This is a common use case in regex to indicate arbitrary character in arbitrary length.
@cipherbowen I saw different conventions in regex.
If '.*' is the convention to indicate arbitrary chars.
How do people represents the following pattern in such convention?
"the same char repeated in any times "
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.