Regex

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Regex

Mike Houghton
Hi,

Which package is the most popular and/or easy to used for dealing with regular expressions?
My regex is quite simple and I just need to get 2 or 3 capture groups from the result.

Many thanks

Mike
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Regex

David McBride
In Haskell virtually everyone uses parser combinator libraries like parsec, megaparsec, or attoparsec depending on their needs.

Many people ask this question and are then disappointed when they can't find a definitively standard regex library to use. That's because they are barely needed.

That's not to say that there are no such libraries
  There are. But I personally couldn't suggest any as I have not been compelled to use one in many years.

On Thu, Dec 6, 2018, 05:38 mike h <[hidden email] wrote:
Hi,

Which package is the most popular and/or easy to used for dealing with regular expressions?
My regex is quite simple and I just need to get 2 or 3 capture groups from the result.

Many thanks

Mike
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Regex

Mike Houghton

:) 
I get a real buzz out of writing parser combinators. So, perversely - if only to broaden my Haskell knowledge, I decided to try using regexs. LOL

I'll see where this takes me!

Thanks

Mike

On Thursday, 6 December 2018, 13:45:21 GMT, David McBride <[hidden email]> wrote:


In Haskell virtually everyone uses parser combinator libraries like parsec, megaparsec, or attoparsec depending on their needs.

Many people ask this question and are then disappointed when they can't find a definitively standard regex library to use. That's because they are barely needed.

That's not to say that there are no such libraries
  There are. But I personally couldn't suggest any as I have not been compelled to use one in many years.

On Thu, Dec 6, 2018, 05:38 mike h <[hidden email] wrote:
Hi,

Which package is the most popular and/or easy to used for dealing with regular expressions?
My regex is quite simple and I just need to get 2 or 3 capture groups from the result.

Many thanks

Mike

_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Regex

Akos Marton
In reply to this post by David McBride
I have positive experiences with regex-compat, regex-posix packages, you can get these from hackage.
When your expression becomes more complicated it may be worth to use parsers instead: faster processing, refactoring parsers is also easier.

On Thu, Dec 6, 2018 at 2:45 PM David McBride <[hidden email]> wrote:
In Haskell virtually everyone uses parser combinator libraries like parsec, megaparsec, or attoparsec depending on their needs.

Many people ask this question and are then disappointed when they can't find a definitively standard regex library to use. That's because they are barely needed.

That's not to say that there are no such libraries
  There are. But I personally couldn't suggest any as I have not been compelled to use one in many years.

On Thu, Dec 6, 2018, 05:38 mike h <[hidden email] wrote:
Hi,

Which package is the most popular and/or easy to used for dealing with regular expressions?
My regex is quite simple and I just need to get 2 or 3 capture groups from the result.

Many thanks

Mike
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


--
People seldom notice clothes, if you wear a big smile.
My grandmother uses Ubuntu, don't you think so?!
OLVASD: http://www.xkcd.org/

_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners