Spaces:
Runtime error
Runtime error
| import re | |
| def extract_pattern(pattern: str, text: str) -> str | None: | |
| matches = re.findall(pattern, text) | |
| if matches: | |
| extracted = matches[-1] | |
| return extracted | |
| else: | |
| return None |
| import re | |
| def extract_pattern(pattern: str, text: str) -> str | None: | |
| matches = re.findall(pattern, text) | |
| if matches: | |
| extracted = matches[-1] | |
| return extracted | |
| else: | |
| return None |