Write a basic Regex engine implementing the "." (any character) and "*" (previous rule, 0 to many). The function receives a string (letters only, no need for escaping) and a string pattern. It returns a bool whether the string matches the pattern. For example, the pattern "AB.*E" should match both "ABCDE" and "ABEEE".
Anónimo
Use recursion. Set 2 pointers at the beginning of both strings, advance each one by one. The trick is to look forward for a "*" and in this case fork to 2 recursive calls - one for a zero occurrences and one for multiple occurrences.