Yes, that worked, thanks. I just figured that out too. Here's a whole working program:
import Text.Regex.Base
import Text.Regex.Posix
rx :: Regex
rx = makeRegex "a(.*)A"
mr = match rx "abcdA"
text = head $ mrSubList mr
main = putStrLn text
Am Dienstag, 23. Dezember 2008 21:09 schrieb Lyle Kopnicky:
> Yes, sort of. It enables me to get some simple examples working with (=~).Your problem is that GHC can't know which instance to choose. You can help it
> But I still don't know how to get makeRegex to work. You need it to specify
> options like case insensitivity, or to use functions like matchAllText.
>
by giving a type signature, e.g.
rx :: Regex
rx = makeRegex "a(.*)A"
HTH,
Daniel