Skip to content

Commit

Permalink
Update matches invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
atuonufure committed Aug 15, 2023
1 parent 1de688f commit 1ec771a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fhirpathpy/engine/invocations/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,11 @@ def join(ctx, coll, separator=""):

# test function
def matches(ctx, coll, regex):
if not regex or not coll:
return []

string = ensure_string_singleton(coll)
valid = re.compile(regex)
valid = re.compile(regex, re.DOTALL)
return re.search(valid, string) is not None


Expand Down

0 comments on commit 1ec771a

Please sign in to comment.