Closed eppolito closed 3 years ago
This behavior conforms to what Text.Regex.Posix
and Text.Regex.PCRE
are doing, so I am inclined to consider this working as intended. PR #25 documents this.
Thanks for addressing this! Still seems slightly weird to me, but if this is the convention best to go with it.
Matching a string of repeated characters seems to confuse
getAllTextMatches
. Minimal test case:Input:
> getAllTextMatches ("aaa" =~ "aa") :: [String]
Output:["aa"]
Expected["aa","aa"]
Input:
> getAllTextMatches ("aaaa" =~ "aa") :: [String]
Output:["aa","aa"]
Expected["aa","aa","aa"]
I guess
getAllTextMatches
is removing the match before looking for additional matches.