<div dir="ltr">The exercise was meant to be done without using any library. Try it out, it will work.<div>A parser combinator library, such as parsec or attoparsec is better learnt after you have some idea of monads, which is the last topic cis194 deals with.</div><div>But, if it interests you, keep going. Parsec might be a better option as it has been there for a longer amount of time, and thus has more learning resources.</div><div><br></div><div>Hope this helps.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 23 February 2015 at 00:52, Roelof Wobben <span dir="ltr"><<a href="mailto:r.wobben@home.nl" target="_blank">r.wobben@home.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Thanks, <br>
<br>
Found this tutorial which works with log files like I have to do :
<a href="https://www.fpcomplete.com/school/starting-with-haskell/libraries-and-frameworks/text-manipulation/attoparsec" target="_blank">https://www.fpcomplete.com/school/starting-with-haskell/libraries-and-frameworks/text-manipulation/attoparsec</a><br>
<br>
Roelof<br>
<br>
<br>
<br>
Benjamin Edwards schreef op 22-2-2015 om 20:14:<br>
</div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">If the format is sufficiently simple a regex can be
a very neat way to express the idea. Mostly people use parser
combinators. Have a look at parsec / attoparsec on hackage.<br>
<div><br>
</div>
<div>Ben</div>
</div>
<br>
<div class="gmail_quote">On Sun Feb 22 2015 at 18:50:18 Roelof
Wobben <<a href="mailto:r.wobben@home.nl" target="_blank">r.wobben@home.nl</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
Im still busy with CIS 194<br>
<br>
Now im facing this problem.<br>
<br>
There is a log file of strings.<br>
<br>
Most of them are of this format char Number [chars]<br>
<br>
What is the best way to check if the string has this format ?<br>
<br>
Regex or another way ?<br>
<br>
Roelof<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Beginners mailing list
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a>
</pre>
</blockquote>
<br>
</div></div></div>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>Regards</div><div dir="ltr"><div><br></div><div>Sumit Sahrawat</div></div></div></div></div></div></div>
</div>