Open ashb opened 7 years ago
For example I haven't found a way to make this work.
c.Check("one\ntwo", Matches, ".*two.*")
Because the matches must be a string, and that string is wrapped with ^ and $ we can't add our own flags either.
^
$
A possible quick fix is to check if the pattern is a regexp.Regexp, in which case don't compile the pattern ourselves.
If you prefix your string with (?m), it should work.
(?m)
For example I haven't found a way to make this work.
Because the matches must be a string, and that string is wrapped with
^
and$
we can't add our own flags either.A possible quick fix is to check if the pattern is a regexp.Regexp, in which case don't compile the pattern ourselves.