Given a text and pattern string. The pattern consists of the following characters
+: It can be replaced with 0 or more occurrence of the previous character
*: Matches any sequence of characters (including the empty sequence)
?: It can be replaced with a single occurrence of any character.
The task is to determine if the string and pattern match after successfully replacing the special characters in the pattern with the above rules. Print true if the text and pattern match else print false
Test Cases:
The first string is the pattern and the second string represents the text
Sample Input 1:
String 1: Am?zo
String 2: Amazon
Sample Output 1:
FALSE
Sample Input 2:
String 1:Am?z*on
String 2:Amazkfdsaon
Sample Output 2:
TRUE
@@coding::1@@