]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
oe/spdx_common: Remove redundant '\d' in RegExp
authorBenjamin Robin (Schneider Electric) <benjamin.robin@bootlin.com>
Mon, 20 Apr 2026 07:44:38 +0000 (09:44 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 20 Apr 2026 16:58:37 +0000 (17:58 +0100)
The \w metacharacter matches word characters.
A word character is a character a-z, A-Z, 0-9, including _

The \d metacharacter matches digits from 0 to 9.

Signed-off-by: Benjamin Robin (Schneider Electric) <benjamin.robin@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/spdx_common.py

index c0ef11f19950bd9331fb879511be15aae47a9778..47d14b55c701610230ad3b60ab4747361c9585ca 100644 (file)
@@ -15,7 +15,7 @@ from pathlib import Path
 from dataclasses import dataclass
 
 LIC_REGEX = re.compile(
-    rb"^\W*SPDX-License-Identifier:\s*([ \w\d.()+-]+?)(?:\s+\W*)?$",
+    rb"^\W*SPDX-License-Identifier:\s*([ \w.()+-]+?)(?:\s+\W*)?$",
     re.MULTILINE,
 )