From 36c08917832efab0594e55dbe195db5ac9c80a44 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Sun, 17 Dec 2023 09:44:08 -0500 Subject: [PATCH] FIX: Add end-of-string character to match whole filenames --- tools/schemacode/bidsschematools/rules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/schemacode/bidsschematools/rules.py b/tools/schemacode/bidsschematools/rules.py index dd5353a0b5..37592618a7 100644 --- a/tools/schemacode/bidsschematools/rules.py +++ b/tools/schemacode/bidsschematools/rules.py @@ -124,7 +124,7 @@ def _entity_rule(rule: Mapping, schema: bst.types.Namespace): ext_regex = f"(?P{ext_match})" return { - "regex": "".join(dir_regex + entity_regex + [suffix_regex, ext_regex]), + "regex": "".join(dir_regex + entity_regex + [suffix_regex, ext_regex, "$"]), "mandatory": False, }