regex-tdfa-0.97.1: Accurate POSIX extended regular expression library

Text.Regex.TDFA.Wrap

Description

Text.Regex.TDFA.Wrap provides the instance of RegexOptions and the definition of (=~) and (=~~). This is all re-exported by Text.Regex.TDFA.

Synopsis

Documentation

data CompOption Source

Control whether the pattern is multiline or case-sensitive like Text.Regex and whether to capture the subgroups (1, 2, etc).

Constructors

CompOption 

Fields

caseSensitive :: Bool

True by default

multiline :: Bool

True by default, implies . and [^a] will not match '\n'

rightAssoc :: Bool

False (and therefore left associative) by default

lastStarGreedy :: Bool

False by default. This is POSIX correct by takes space and is slower. Setting this to true will improve performance, and should be done if you plan to set the captureGroups execoption to False.

data ExecOption Source

Constructors

ExecOption 

Fields

captureGroups :: Bool

True by default. Set to False to improve speed (and space).

testMatch :: Bool

False by default. Set to True to quickly return shortest match (w/o groups). [ UNUSED ]

(=~) :: (RegexMaker Regex CompOption ExecOption source, RegexContext Regex source1 target) => source1 -> source -> targetSource

This is the pure functional matching operator. If the target cannot be produced then some empty result will be returned. If there is an error in processing, then error will be called.

(=~~) :: (RegexMaker Regex CompOption ExecOption source, RegexContext Regex source1 target, Monad m) => source1 -> source -> m targetSource

This is the monadic matching operator. If a single match fails, then fail will be called.