[Haskell-beginners] how to check the format of a string ?

Benjamin Edwards edwards.benj at gmail.com
Sun Feb 22 19:14:51 UTC 2015


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.

Ben

On Sun Feb 22 2015 at 18:50:18 Roelof Wobben <r.wobben at home.nl> wrote:

> Hello,
>
> Im still busy with CIS 194
>
> Now im facing this problem.
>
> There is a log file of strings.
>
> Most of them are of this format   char  Number [chars]
>
> What is the best way to check if the string has this format ?
>
> Regex or another way ?
>
> Roelof
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150222/7a1e69c1/attachment.html>


More information about the Beginners mailing list