first commit

This commit is contained in:
Mai-Vu Tran
2026-03-16 18:14:44 +07:00
commit 6699c516cd
31 changed files with 9946 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import re
import json
content = """Sure, here are some suggestions:
```json
{
"suggestions": [
{"title": "A", "description": "B"}
]
}
```
Good luck!
"""
match = re.search(r'(\{[\s\S]*"suggestions"[\s\S]*\})', content)
if match:
try:
data = json.loads(match.group(1))
print("SUCCESS:", data)
except Exception as e:
print("FAIL LOAD:", e)
else:
print("NO MATCH")