[Haskell-cafe] regex and Regular Expressions Libraries

Evan Laforge qdunkan at gmail.com
Fri Mar 10 17:50:31 UTC 2017

On Fri, Mar 10, 2017 at 9:30 AM, Chris Dornan <chris at chrisdornan.com> wrote:
> On the use of ‘$’, as far as I know this extension will not clash with any of
> the PCRE extensions (if anybody knows of any problems please give me shout),
> though for sure you will have to fill out the numbers when converting between
> the two text-replacement schemes.

Oh ok, I was worried that ()s would become non-capturing and you'd
have to use $() to capture.  I think your scheme with $() for groups
and replacement is actually nicer than the traditional (xyz) and
(?:xyz) and \# for replacement, but you know tradition hangs heavy on
the minds of us regex cargo-culters :)

> As for Text and PCRE – that is on the top my list but it will need some
> coordination with the upstream regex-pcre maintainers.

Nowadays I inherit that from pcre-heavy, but of course if you're
already on another backend then maybe not so simple.  libpcre takes
bytestrings, so I'll bet the "Text interface" amounts to sticking ".
encodeUtf8" on the front and turning on the UTF8 flag.

More information about the Haskell-Cafe mailing list