mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-08-28 05:25:04 +00:00
9 lines
214 B
Python
9 lines
214 B
Python
import re
|
|
|
|
|
|
def get_html_match_content(content: str, key: str):
|
|
pattern = rf"<{key}>(.*?)</{key}>"
|
|
match = re.search(pattern, content, re.DOTALL)
|
|
if match:
|
|
return match.group(1)
|
|
return None
|