Text.Regex.TDFA.ReadRegex

regex-tdfa-1.2.2: Replaces/Enhances Text.Regex

Safe Haskell | None
Language | Haskell98

Text.Regex.TDFA.ReadRegex

Description

This is a POSIX version of parseRegex that allows NUL characters. Lazy/Possessive/Backrefs are not recognized. Anchors ^ and $ are recognized.

The PGroup returned always have (Maybe GroupIndex) set to (Just _) and never to Nothing.

Synopsis

- parseRegex :: String -> Either ParseError (Pattern, (GroupIndex, DoPa))

# Documentation

parseRegex :: String -> Either ParseError (Pattern, (GroupIndex, DoPa)) #

Return either an error message or a tuple of the Pattern and the largest group index and the largest DoPa index (both have smallest index of 1). Since the regular expression is supplied as [Char] it automatically supports unicode and `\NUL` characters.