Is there a high-level API for doing search-and-replace with regexes in Haskell? In particular, I\'m looking at the Text.Regex.TDFA or Text.Regex.Posix
Text.Regex.TDFA
Text.Regex.Posix
For doing “search-and-replace” with “more advanced things with the monad, like counting occurrences, etc,” I recommend Replace.Megaparsec.streamEditT.
See the package README for specific examples of how to count occurrences.