regex-pcre-builtin-0.94.1.0.7.7: Replaces/Enhances Text.RegexSource codeContentsIndex
Text.Regex.PCRE.ByteString.Lazy
Contents
Types
Miscellaneous
Medium level API functions
CompOption flags
ExecOption flags
Description
This exports instances of the high level API and the medium level API of compile,execute, and regexec.
Synopsis
data Regex
MatchOffset
MatchLength
newtype CompOption = CompOption CInt
newtype ExecOption = ExecOption CInt
data ReturnCode
type WrapError = (ReturnCode, String)
unusedOffset :: MatchOffset
getVersion :: Maybe String
compile :: CompOption -> ExecOption -> ByteString -> IO (Either (MatchOffset, String) Regex)
execute :: Regex -> ByteString -> IO (Either WrapError (Maybe (Array Int (MatchOffset, MatchLength))))
regexec :: Regex -> ByteString -> IO (Either WrapError (Maybe (ByteString, ByteString, ByteString, [ByteString])))
compBlank :: CompOption
compAnchored :: CompOption
compAutoCallout :: CompOption
compCaseless :: CompOption
compDollarEndOnly :: CompOption
compDotAll :: CompOption
compExtended :: CompOption
compExtra :: CompOption
compFirstLine :: CompOption
compMultiline :: CompOption
compNoAutoCapture :: CompOption
compUngreedy :: CompOption
compUTF8 :: CompOption
compNoUTF8Check :: CompOption
execBlank :: ExecOption
execAnchored :: ExecOption
execNotBOL :: ExecOption
execNotEOL :: ExecOption
execNotEmpty :: ExecOption
execNoUTF8Check :: ExecOption
execPartial :: ExecOption
Types
data Regex Source
A compiled regular expression
show/hide Instances
MatchOffset
MatchLength
newtype CompOption Source
Constructors
CompOption CInt
show/hide Instances
newtype ExecOption Source
Constructors
ExecOption CInt
show/hide Instances
data ReturnCode Source
show/hide Instances
type WrapError = (ReturnCode, String)Source
Miscellaneous
unusedOffset :: MatchOffsetSource
getVersion :: Maybe StringSource
return version of pcre used or Nothing if pcre is not available.
Medium level API functions
compileSource
:: CompOption(summed together)
-> ExecOption(summed together)
-> ByteStringThe regular expression to compile
-> IO (Either (MatchOffset, String) Regex)Returns: the compiled regular expression
Compiles a regular expression
executeSource
:: RegexCompiled regular expression
-> ByteStringString 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 buffer, returning the buffer indicies of the match, and any submatches

| Matches a regular expression against a string

regexecSource
:: RegexCompiled regular expression
-> ByteStringString to match against
-> IO (Either WrapError (Maybe (ByteString, ByteString, ByteString, [ByteString])))
CompOption flags
compBlank :: CompOptionSource
compAnchored :: CompOptionSource
compAutoCallout :: CompOptionSource
compCaseless :: CompOptionSource
compDollarEndOnly :: CompOptionSource
compDotAll :: CompOptionSource
compExtended :: CompOptionSource
compExtra :: CompOptionSource
compFirstLine :: CompOptionSource
compMultiline :: CompOptionSource
compNoAutoCapture :: CompOptionSource
compUngreedy :: CompOptionSource
compUTF8 :: CompOptionSource
compNoUTF8Check :: CompOptionSource
ExecOption flags
execBlank :: ExecOptionSource
execAnchored :: ExecOptionSource
execNotBOL :: ExecOptionSource
execNotEOL :: ExecOptionSource
execNotEmpty :: ExecOptionSource
execNoUTF8Check :: ExecOptionSource
execPartial :: ExecOptionSource
Produced by Haddock version 2.4.2