PythiloHard · 40 min · Task 90 of 100 · progress kept in this browser

Match dot and star patterns

Match the whole text against a valid pattern with lowercase literals, dot for any one character, and star for zero or more of the preceding atom. No leading or repeated star occurs.

pattern = 'a*b'
j = 0
print(pattern[j+1] == '*')
print(pattern[j+2:])  # skip a*
Your task

Match the whole text against a valid pattern with lowercase literals, dot for any one character, and star for zero or more of the preceding atom. No leading or repeated star occurs.