Skip to content

Commit

Permalink
fix re option
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudbore committed May 30, 2022
1 parent 957dba5 commit e9cdaaf
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 e9cdaaf

Please sign in to comment.