regex-tdfa-text-1.0.0.3: Text interface for regex-tdfa

CopyrightChris Kuklewicz 2007-2009 shelarcy 2012
LicenseBSD-style (see the file LICENSE)
Maintainershelarcy <shelarcy@gmail.com>
Stabilityexperimental
PortabilityGHC (uses text)
Safe HaskellNone
LanguageHaskell98

Text.Regex.TDFA.Text.Lazy

Contents

Description

This modules provides RegexMaker and RegexLike instances for using Text with the TDFA backend (Text.Regex.TDFA.NewDFA.Engine and Text.Regex.TDFA.NewDFA.Tester).

This exports instances of the high level API and the medium level API of compile,execute, and regexec.

Documentation

compile Source #

Arguments

:: CompOption

Flags (summed together)

-> ExecOption

Flags (summed together)

-> Text

The regular expression to compile

-> Either String Regex

Returns: the compiled regular expression

execute Source #

Arguments

:: Regex

Compiled regular expression

-> Text

Text to match against

-> Either String (Maybe MatchArray) 

regexec Source #

Arguments

:: Regex

Compiled regular expression

-> Text

Text to match against

-> Either String (Maybe (Text, Text, Text, [Text])) 

Orphan instances

Extract Text Source # 

Methods

before :: Int -> Text -> Text

after :: Int -> Text -> Text

empty :: Text

extract :: (Int, Int) -> Text -> Text

Uncons Text Source # 

Methods

uncons :: Text -> Maybe (Char, Text)

RegexLike Regex Text Source # 

Methods

matchOnce :: Regex -> Text -> Maybe MatchArray

matchAll :: Regex -> Text -> [MatchArray]

matchCount :: Regex -> Text -> Int

matchTest :: Regex -> Text -> Bool

matchAllText :: Regex -> Text -> [MatchText Text]

matchOnceText :: Regex -> Text -> Maybe (Text, MatchText Text, Text)

RegexContext Regex Text Text Source # 

Methods

match :: Regex -> Text -> Text

matchM :: Monad m => Regex -> Text -> m Text

RegexMaker Regex CompOption ExecOption Text Source # 

Methods

makeRegex :: Text -> Regex

makeRegexOpts :: CompOption -> ExecOption -> Text -> Regex

makeRegexM :: Monad m => Text -> m Regex

makeRegexOptsM :: Monad m => CompOption -> ExecOption -> Text -> m Regex