Esteemed Haskellers,
It is working for me, but I am puzzled by the matchRegex function:
> import Text.Regex
> :i matchRegex
matchRegex :: Regex -> String -> Maybe [String]
-- Defined in ‘Text.Regex’
Searches that fail return Nothing:
> matchRegex (mkRegex "z") "abracadabra"
Nothing
which makes sense. But why do searches that succeed return an empty list of Strings?
> matchRegex (mkRegex "a") "abracadabra"
Just []
>
--