(Simon Marlow supplied the String Regex wrapper.)
For simple regular expression operations, the Regex library is a little heavyweight. RegexString permits regex matching on ordinary Haskell Strings.
The datatypes and functions that RegexString provides are:
data Regex -- a compiled regular expression
mkRegex
:: String -- regexp to compile
-> Regex -- compiled regexp
matchRegex
:: Regex -- compiled regexp
-> String -- string to match
-> Maybe [String] -- text of $1, $2, ... (if matched) |