Pattern matching through regular expression [reviewed]
Problem Pattern Matching ---------------- Characters: a to z Operators: * + * -> matches zero or more (of the character that occurs previous to this operator) + -> matches one or more (of the character that occurs previous to this operator) Output if a given pattern matches a string. Example: pattern:a*b string:aaab b, ab, aab, aaab, ab output:1 pattern:a+aabc string:ab aabc, aaabc, aaaabc .. output:0 pattern:aa*b*ab+ string:aab aab, aabab, aaaabbab output:1 pattern: a+a*b* string: a ab, aab, aaabb output: 1 Valid Assumptions: Please assume that both the pattern and string input are valid