Skip to content

Commit

Permalink
Merge pull request #167 from UNFmontreal/BFnameAsString
Browse files Browse the repository at this point in the history
fix re option
  • Loading branch information
arnaudbore authored May 30, 2022
2 parents 957dba5 + e9cdaaf commit 37139af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dcm2bids/sidecar.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,11 @@ def isLink(self, data, criteria):
"""

def compare(name, pattern):
name = str(name)
if self.searchMethod == "re":
return bool(re.search(pattern, name))
return bool(re.match(pattern, name))
else:
name = str(name)

pattern = str(pattern)
if not self.caseSensitive:
name = name.lower()
Expand Down

0 comments on commit 37139af

Please sign in to comment.