From 27028bd3b173539fd93eed880ad31a73fc7d1719 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Wed, 8 Jan 2025 17:24:07 +0100 Subject: programs: fix regex to match multi-digit major version In a3679a64e (programs: favor version numbers with dots, 2025-01-03) we have changed the regex used to extract version numbers to favor dotted versions. It was reported though that the regex doesn't match major version numbers that start with multiple digits correctly. Fix this. Signed-off-by: Patrick Steinhardt --- mesonbuild/programs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/programs.py') diff --git a/mesonbuild/programs.py b/mesonbuild/programs.py index 7f4cec52d..d01440cce 100644 --- a/mesonbuild/programs.py +++ b/mesonbuild/programs.py @@ -123,7 +123,7 @@ class ExternalProgram(mesonlib.HoldableObject): if not output: output = e.strip() - match = re.search(r'([0-9](\.[0-9]+)+)', output) + match = re.search(r'([0-9]+(\.[0-9]+)+)', output) if not match: match = re.search(r'([0-9][0-9\.]+)', output) if not match: -- cgit v1.2.3