regex-applicative
regex-applicative copied to clipboard
findAll
would it be possible to have a findAll method that returns all matches in a string?
I think this works? (warning: it may not work) It is meant to be like in other languages' behavior where the matches are non-overlapping.
findAll :: RE s a -> [s] -> [a]
findAll = unfoldr . findFirstPrefix . (few anySym *>)
If you'd like I can write some tests and make a PR :)