Write a function to implement a regex pattern matching algorithm.
Support literal lowercase letters, . matching any single character, and * matching zero or more occurrences of the preceding element. The match must cover the entire input string.
Function: is_match(s, p) Return a Boolean. Constraints: 0 <= len(s), len(p) <= 1000; * never appears as the first pattern character.
s contains only lowercase English lettersp contains lowercase English letters, . and ** never appears as the first pattern characterdef is_match(s, p):