<div dir="ltr">Aha! Thanks, Kiss!</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 5, 2016 at 1:24 PM, Adam Bergmark <span dir="ltr"><<a href="mailto:adam@bergmark.nl" target="_blank">adam@bergmark.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><img style="border:none;background:none" src="https://welovepg.polymail.io/v2/z/a/NTcwNDFlOTM4Njcx/4MfeLRqw9nt-IpxlBh8Lc87dd1Mqi7xhDHJqZqkEKFRZTd2xZcWrMNc_RBeUuqcQ-zLP8vXDzJ6-ZItz_JUVS2vTinZ8mE_XRSaclmtTfBpUtbiV993-vb_rSFYCevWYfJowFJA0DDBysKNydUoNyCA5.png" alt="" width="0px" height="0px" border="0"><div>The regex-compat docs say "<span style="font-family:sans-serif;font-size:13px;line-height:18.2px;background-color:rgb(255,255,255)">Returns: </span><code style="margin:0px;padding:0px;line-height:16.12px;font-size:13px;background-color:rgb(255,255,255)"><code style="margin:0px;padding:0px;line-height:16.12px"><a href="https://hackage.haskell.org/packages/archive/base/4.5.0.0/doc/html/Data-Maybe.html#v:Just" style="margin:0px;padding:0px;text-decoration:none;color:rgb(171,105,84)" target="_blank">Just</a></code> strs</code><span style="font-family:sans-serif;font-size:13px;line-height:18.2px;background-color:rgb(255,255,255)"> if the match succeeded (and </span><code style="margin:0px;padding:0px;line-height:16.12px;font-size:13px;background-color:rgb(255,255,255)">strs</code><span style="font-family:sans-serif;font-size:13px;line-height:18.2px;background-color:rgb(255,255,255)"> is the list of subexpression matches), or </span><code style="margin:0px;padding:0px;line-height:16.12px;font-size:13px;background-color:rgb(255,255,255)"><a href="https://hackage.haskell.org/packages/archive/base/4.5.0.0/doc/html/Data-Maybe.html#v:Nothing" style="margin:0px;padding:0px;text-decoration:none;color:rgb(171,105,84)" target="_blank">Nothing</a></code><span style="font-family:sans-serif;font-size:13px;line-height:18.2px;background-color:rgb(255,255,255)"> otherwise.</span><span style="background-color:rgb(255,255,255);font-size:13px;line-height:18.200000762939453px"><font face="sans-serif">”</font></span><span style="font-family:sans-serif;font-size:13px;line-height:18.2px;background-color:rgb(255,255,255)">.</span></div><span class="HOEnZb"><font color="#888888"><br><div><div>Adam Bergmark</div><div><br></div></div></font></span><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Tue 05 Apr 2016 at 22:16 Jeffrey Brown <u></u> <<a href="mailto:Jeffrey+Brown+%3Cjeffbrown.the@gmail.com%3E" target="_blank">Jeffrey Brown <u></u></a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Esteemed Haskellers,</div><div><br></div><div>It is working for me, but I am puzzled by the matchRegex function:</div><div><br></div><div>    > import Text.Regex</div><div>    > :i matchRegex</div><div>    matchRegex :: Regex -> String -> Maybe [String]</div><div>            -- Defined in ‘Text.Regex’</div><div><br></div><div>Searches that fail return Nothing:</div><div><br></div><div>    > matchRegex (mkRegex "z") "abracadabra"</div><div>    Nothing</div><div><br></div><div>which makes sense. But why do searches that succeed return an empty list of Strings?</div><div><br></div><div>    > matchRegex (mkRegex "a") "abracadabra"</div><div>    Just []</div><div>    > </div><div><br></div>-- <br><div><div dir="ltr">Jeffrey Benjamin Brown</div></div>
</div>
</div></div><p>_______________________________________________
<br><span class="">Haskell-Cafe mailing list
<br><a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a>
<br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
<br></span></p></blockquote></div><br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Jeffrey Benjamin Brown</div></div>
</div>