From 4ad1fc14a4869e9d59ae2920e36c286621097360 Mon Sep 17 00:00:00 2001 From: Wladastic Date: Mon, 10 Apr 2023 22:59:16 +0200 Subject: [PATCH] use regex instead of re --- scripts/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/main.py b/scripts/main.py index df07cb264..6a4723d4e 100644 --- a/scripts/main.py +++ b/scripts/main.py @@ -64,8 +64,8 @@ def attempt_to_fix_json_by_finding_outermost_brackets(json_string): try: # Use regex to search for JSON objects - import re - json_pattern = re.compile(r"\{(?:[^{}]|(?R))*\}") + import regex + json_pattern = regex.compile(r"\{(?:[^{}]|(?R))*\}") json_match = json_pattern.search(json_string) if json_match: