From a2d04a2de7bbf204e289e2c2e4cdf75b0a59565f Mon Sep 17 00:00:00 2001 From: Koji Noshita Date: Tue, 12 Mar 2024 23:14:07 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=20inefficient=20regular?= =?UTF-8?q?=20expression?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ktch/io/_tps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ktch/io/_tps.py b/ktch/io/_tps.py index a031bdd..6d8fc98 100644 --- a/ktch/io/_tps.py +++ b/ktch/io/_tps.py @@ -224,11 +224,11 @@ def write_tps( flags=re.MULTILINE, ) PTN_CURVES = re.compile( - r"^(?PCURVES\s*=\s*[0-9]+\s*(?P(POINTS\s*=\s*[0-9]+\s*[0-9\s\.-]+)+))$", + r"^(?PCURVES\s*=\s*[0-9]+\s+(?P(POINTS\s*=\s*[0-9]+\s+[0-9\s\.-]+)+))$", flags=re.MULTILINE, ) PTN_POINTS = re.compile( - r"^(?PPOINTS\s*=\s*[0-9]+\s*([\w\.-]+\s+[\w\.-]+\s*[\w\.-]*\s*)+)", + r"^(?PPOINTS\s*=\s*[0-9]+\s+([\w\.-]+\s+[\w\.-]+\s*[\w\.-]*\s*)+)", flags=re.MULTILINE, )