Package for regular expressions

Hi, everyone! Due to the recent discussions discussions about regex- packages on libraries@ and cafe, as well as due to the unicode bug in darcs that Erik Kow and I have stumbled upon I wanted to ask the Haskell community the following: What is up with the regular expression packages? Which one is the go-to package? There are really a bunch of them around (regex-compat, regex-tdfa, regex-posicx, regex-compat-tdfa,, ..) and it's not obvious at all what is the difference between them and which one should I use. Any advice or comments are appreciated. Sincerely yours, -- Daniil Frumin

On 02/09/2014 12:14 PM, Daniil Frumin wrote:
What is up with the regular expression packages? Which one is the go-to package? There are really a bunch of them around (regex-compat, regex-tdfa, regex-posicx, regex-compat-tdfa,, ..) and it's not obvious at all what is the difference between them and which one should I use.
This might be outdated, but provides a good comparison : http://www.haskell.org/haskellwiki/Regular_expressions I went fairly quickly to regex-pcre-builtin, as it's actually Perl compatible, which I believe is the most common regex dialect in use. It is also straightforward to use.

On Sun, Feb 9, 2014 at 6:14 AM, Daniil Frumin
What is up with the regular expression packages? Which one is the go-to package? There are really a bunch of them around (regex-compat, regex-tdfa, regex-posicx, regex-compat-tdfa,, ..) and it's not obvious at all what is the difference between them and which one should I use.
The great bulk of those packages accompany regex-base. They provide "backends" which you then use through the pcre-base interface. pcre-base has a heavily overloaded interface. It's novel, but I think understanding what it is really doing is not at all straightforward. This is exemplified by the chapter about regular expressions in Real World Haskell, which dismisses explaining what one of the functions does with "As a result, the type signature of the (=~) operator is difficult to understand, so we will not explain it here." http://book.realworldhaskell.org/read/efficient-file-processing-regular-expr... For something easier to understand, I recommend pcre-light. Its types are straightforward.

I kinda like regex-applicative https://github.com/feuerbach/regex-applicative -- xmpp: berdario@gmail.com bitmessage: BM-2cTYXfGiSTsnx3righ6aHcJSWe4MV17jDP gpg fingerprint: 3F8D53518012716C4EEF7DF67B498306B3BF75A0 (used just for signing commits)

* Dario Bertini
I kinda like regex-applicative
It is rather slow compared to ordinary regex packages. (Although it is more powerful, as it allows real parsing.) Roman
participants (5)
-
Daniil Frumin
-
Dario Bertini
-
Omari Norman
-
Roman Cheplyaka
-
Simon Marechal