ByteString version of Text.Regex?
dons at galois.com
Fri Mar 4 00:43:16 CET 2011
The regex-* packages are polymorphic in the string type they accept, so
it should be possible to use them with bytestrings.
(you can choose which regex automata you like)
> I want a version of the Text.Regex library where the input is a
> character-based ByteString instead of a String. I haven't found one
> on hackage, although I'm not convinced I've looked exhaustively.
> (Every time I try to explore the regular expression libraries on
> Hackage, I end up in a maze of documentation, never sure precisely
> where I am or where I should be going.) It would be really helpful
> if there were a few English paragraphs somewhere explaining the
> high-level model provided by the various modules!
> I ended up taking a version of Text.Regex and making changes to
> produce a library that works for lazy character ByteStrings. Is that
> a reasonable thing to do? I'm going to make my software public soon,
> so I'll either need to release this modified library or swap my
> version out for a more standard one.
> Any suggestions on the best way to proceed?
> Libraries mailing list
> Libraries at haskell.org
More information about the Libraries