Implement matching of a string against a pattern supporting . (any single character) and * (zero or more of the preceding element). The match must cover the entire string.
Input: line 1 — the string s; line 2 — the pattern p (a * always follows a letter or .).
Output:true or false.
Your program reads from stdin and prints to stdout.
Implement matching of a string against a pattern supporting . (any single character) and * (zero or more of the preceding element). The match must cover the entire string.
Input: line 1 — the string s; line 2 — the pattern p (a * always follows a letter or .).
Output:true or false.
Your program reads from stdin and prints to stdout.