Practice Problem

Regular Expression Matching

Difficulty: Hard

Implement regular expression matching with support for '.' (matches any single character) and '*' (matches zero or more of the preceding element).