GoalScope — regular_expression_matching (Qwen2.5-Coder-32B-Instruct) — hover a token to see the patched verbalization
↵
<code>↵
def regular_expression_matching(s, p):↵
"""Function to match regex with support for '.' and '*'"""↵
if not p:↵
return not s↵
↵
first_match = (len(s) > 0) and p[0] in {s[0], '.'}↵
↵
if len(p) >= 2 and p[1] == '*':↵
return regular_expression_matching(s, p[2:]) or (first_match and regular_expression_matching(s[1:], p))↵
else:↵
return first_match and regular_expression_matching(s[1:], p[1:])↵
</code>