When processing large amounts of textual data, it is recommended to use Data.Text
instead of haskells native strings. Check, done. But how about regular expressions? Is there a regex library available, specialized on Data.Text
? As far as I can see, all regular expression libraries are working on Haskell native Strings or even worse CStrings.
This backend provides a Haskell interface for the "posix" c-library that comes with most operating systems, and is provided by include "regex.
The shows functions return a function that prepends the output String to an existing String . This allows constant-time concatenation of results using function composition.
Regular Expressions and Wildcards can be used for finding and replacing or removing text in a file, database, or filename. It is very powerful and can even assist in cleaning and reformatting data.
From the Data.Text documentation:
To use an extended and very rich family of functions for working with Unicode text (including normalization, regular expressions, non-standard encodings, text breaking, and locales), see the text-icu package: http://hackage.haskell.org/package/text-icu
More precisely Data.Text.ICU.Regex
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With