#!/usr/bin/env python3 import re xml = """ execute_code python print(50 / 2) To calculate the result of dividing 50 by 2. """ pattern = r'(.*?)' matches = re.findall(pattern, xml, re.DOTALL) print(f"Pattern: {pattern}") print(f"Number of matches: {len(matches)}") print("\nMatches:") for idx, match in enumerate(matches): print(f"\nMatch {idx + 1}:") print(f"Length: {len(match)} chars") print(f"Content:\n{match[:200]}") # Now test what gets removed clean_content = re.sub(pattern, '', xml, flags=re.DOTALL).strip() print(f"\n\nCleaned content:\n{clean_content}")