Skip to content
Snippets Groups Projects
Commit 33640abf authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

BF: isBIDSFile should return boolean

parent a7543878
No related branches found
No related tags found
No related merge requests found
......@@ -150,7 +150,7 @@ def isBIDSFile(filename, strict=True):
name = op.basename(filename)
pattern = r'([a-z0-9]+-[a-z0-9]+_)*([a-z0-9])+\.(nii|nii\.gz|json)'
flags = re.ASCII | re.IGNORECASE
match = re.fullmatch(pattern, name, flags)
match = re.fullmatch(pattern, name, flags) is not None
return ((not strict) or inBIDSDir(filename)) and match
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment