Regex Matching
STRING
DYNAMIC PROGRAMMING
RECURSION

Problem

Given an input string text and a pattern, implement regular expression matching with support for . and *.

Here, . matches any single character, and * matches zero or more of the preceding element. The matching should cover the entire input string (not partial).

Examples

isMatch("aa", "a*") // true isMatch("ab", ".*") // true isMatch("mississippi", "mis*is*p*.") // false, the 'i' before the last two 'p' is missing
Loading...