As the problem said, '.' can match any single character, then this is no reason why '.' cannot match '\0', which is the ending character of char *. So I think the description should modified " . can match any single character except \0 character".
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.