Yes, that worked, thanks. I just figured that out too. Here's a whole working program:<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">import Text.Regex.Base<br>
import Text.Regex.Posix<br><br>rx :: Regex<br>rx = makeRegex "a(.*)A"<br><br>mr = match rx "abcdA"<br><br>text = head $ mrSubList mr<br><br>main = putStrLn text<br></blockquote><div><div><br><div class="gmail_quote">
On Tue, Dec 23, 2008 at 12:30 PM, Daniel Fischer <span dir="ltr"><<a href="mailto:daniel.is.fischer@web.de">daniel.is.fischer@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Am Dienstag, 23. Dezember 2008 21:09 schrieb Lyle Kopnicky:<br>
<div class="Ih2E3d">> Yes, sort of. It enables me to get some simple examples working with (=~).<br>
> But I still don't know how to get makeRegex to work. You need it to specify<br>
> options like case insensitivity, or to use functions like matchAllText.<br>
><br>
<br>
</div>Your problem is that GHC can't know which instance to choose. You can help it<br>
by giving a type signature, e.g.<br>
<br>
rx :: Regex<br>
rx = makeRegex "a(.*)A"<br>
<br>
HTH,<br>
<font color="#888888">Daniel<br>
</font><div class="Ih2E3d"><br></div></blockquote></div></div></div>