I used several codes which is accepted, the answers are all false. Why they didn't match. I misunderstood the question?
No, “a*b” doesn't and shouldn't match “aa”. No idea why you think it might.
In the examples provided below the question, "aab" and "cab", return true. Why "aab" and "cab" matches please?
'' Matches zero or more of the preceding element.
ab means a can appear zero or more,
"cab" means c and a can appear zero or more
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.