rex-0.1: A quasi-quoter for typeful results of regex captures.

Portabilityunportable
Stabilityunstable
MaintainerMichael Sloan (mgsloan@gmail.com)

Text.Regex.PCRE.Precompile

Description

This module provides support for accessing the compiled representation of PCRE regular expressions. This byte array encodes a lookup-table based representation for the regular expression, and can be safely written out and read back by compatible PCRE versions.

Synopsis

Documentation

precompile :: ByteString -> [PCREOption] -> IO (Maybe ByteString)Source

Compiles the given regular expression, and assuming nothing bad happens, yields the bytestring filled with PCRE's compiled representation.

regexToTable :: Regex -> IO (Maybe ByteString)Source

Takes a compiled regular expression adn yields its bytestring representation.

regexFromTable :: ByteString -> IO RegexSource

Creates a regular expression