regex-pcre-text-0.94.0.1: Text-based PCRE API for regex-base

Safe HaskellNone
LanguageHaskell2010

Text.Regex.PCRE.Text.Lazy

Contents

Synopsis

Types

data Regex #

A compiled regular expression

Instances
RegexLike Regex Text # 
Instance details

Defined in Text.Regex.PCRE.Text.Lazy

RegexLike Regex Text # 
Instance details

Defined in Text.Regex.PCRE.Text

RegexOptions Regex CompOption ExecOption 
Instance details

Defined in Text.Regex.PCRE.Wrap

RegexContext Regex Text Text # 
Instance details

Defined in Text.Regex.PCRE.Text.Lazy

Methods

match :: Regex -> Text -> Text #

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

RegexContext Regex Text Text # 
Instance details

Defined in Text.Regex.PCRE.Text

Methods

match :: Regex -> Text -> Text #

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

RegexMaker Regex CompOption ExecOption Text # 
Instance details

Defined in Text.Regex.PCRE.Text.Lazy

RegexMaker Regex CompOption ExecOption Text # 
Instance details

Defined in Text.Regex.PCRE.Text

type MatchOffset = Int #

0 based index from start of source, or (-1) for unused

type MatchLength = Int #

non-negative length of a match

newtype CompOption #

Constructors

CompOption CInt 
Instances
Eq CompOption 
Instance details

Defined in Text.Regex.PCRE.Wrap

Num CompOption 
Instance details

Defined in Text.Regex.PCRE.Wrap

Show CompOption 
Instance details

Defined in Text.Regex.PCRE.Wrap

Bits CompOption 
Instance details

Defined in Text.Regex.PCRE.Wrap

RegexOptions Regex CompOption ExecOption 
Instance details

Defined in Text.Regex.PCRE.Wrap

RegexMaker Regex CompOption ExecOption Text # 
Instance details

Defined in Text.Regex.PCRE.Text.Lazy

RegexMaker Regex CompOption ExecOption Text # 
Instance details

Defined in Text.Regex.PCRE.Text

newtype ExecOption #

Constructors

ExecOption CInt 
Instances
Eq ExecOption 
Instance details

Defined in Text.Regex.PCRE.Wrap

Num ExecOption 
Instance details

Defined in Text.Regex.PCRE.Wrap

Show ExecOption 
Instance details

Defined in Text.Regex.PCRE.Wrap

Bits ExecOption 
Instance details

Defined in Text.Regex.PCRE.Wrap

RegexOptions Regex CompOption ExecOption 
Instance details

Defined in Text.Regex.PCRE.Wrap

RegexMaker Regex CompOption ExecOption Text # 
Instance details

Defined in Text.Regex.PCRE.Text.Lazy

RegexMaker Regex CompOption ExecOption Text # 
Instance details

Defined in Text.Regex.PCRE.Text

data ReturnCode #

Instances
Eq ReturnCode 
Instance details

Defined in Text.Regex.PCRE.Wrap

Show ReturnCode 
Instance details

Defined in Text.Regex.PCRE.Wrap

Miscellaneous

getVersion :: Maybe String #

return version of pcre used or Nothing if pcre is not available.

Medium level API functions

compile #

Arguments

:: CompOption

(summed together)

-> ExecOption

(summed together)

-> Text

The regular expression to compile

-> IO (Either (MatchOffset, String) Regex)

Returns: the compiled regular expression

Compiles a regular expression

execute #

Arguments

:: Regex

Compiled regular expression

-> Text

Text to match against

-> IO (Either WrapError (Maybe (Array Int (MatchOffset, MatchLength))))

Returns: Nothing if the regex did not match the string, or Just an array of (offset,length) pairs where index 0 is whole match, and the rest are the captured subexpressions.

Matches a regular expression against a string

regexec #

Arguments

:: Regex

Compiled regular expression

-> Text

Text to match against

-> IO (Either WrapError (Maybe (Text, Text, Text, [Text])))

Returns: Nothing if the regex did not match the string, or Just text including before and after text

Matches a regular expression against a string

CompOption flags

ExecOption flags

Orphan instances