regex-pcre-builtin-0.94.2.0.7.7: Replaces/Enhances Text.Regex
Source code
Contents
Index
Text.Regex.PCRE.Sequence
Contents
Types
Miscellaneous
Medium level API functions
Constants for CompOption
Constants for ExecOption
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
->
Seq
Char
->
IO
(
Either
(
MatchOffset
,
String
)
Regex
)
execute
::
Regex
->
Seq
Char
->
IO
(
Either
WrapError
(
Maybe
(
Array
Int
(
MatchOffset
,
MatchLength
))))
regexec
::
Regex
->
Seq
Char
->
IO
(
Either
WrapError
(
Maybe
(
Seq
Char
,
Seq
Char
,
Seq
Char
, [
Seq
Char
])))
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
Instances
RegexLike
Regex
String
RegexLike
Regex
ByteString
RegexLike
Regex
ByteString
RegexOptions
Regex
CompOption
ExecOption
RegexContext
Regex
String
String
RegexContext
Regex
ByteString
ByteString
RegexContext
Regex
ByteString
ByteString
RegexMaker
Regex
CompOption
ExecOption
String
RegexMaker
Regex
CompOption
ExecOption
ByteString
RegexMaker
Regex
CompOption
ExecOption
ByteString
RegexMaker
Regex
CompOption
ExecOption
(
Seq
Char
)
RegexLike
Regex
(
Seq
Char
)
RegexContext
Regex
(
Seq
Char
) (
Seq
Char
)
MatchOffset
MatchLength
newtype
CompOption
Source
Constructors
CompOption
CInt
Instances
Eq
CompOption
Num
CompOption
Show
CompOption
Bits
CompOption
RegexOptions
Regex
CompOption
ExecOption
RegexMaker
Regex
CompOption
ExecOption
String
RegexMaker
Regex
CompOption
ExecOption
ByteString
RegexMaker
Regex
CompOption
ExecOption
ByteString
RegexMaker
Regex
CompOption
ExecOption
(
Seq
Char
)
newtype
ExecOption
Source
Constructors
ExecOption
CInt
Instances
Eq
ExecOption
Num
ExecOption
Show
ExecOption
Bits
ExecOption
RegexOptions
Regex
CompOption
ExecOption
RegexMaker
Regex
CompOption
ExecOption
String
RegexMaker
Regex
CompOption
ExecOption
ByteString
RegexMaker
Regex
CompOption
ExecOption
ByteString
RegexMaker
Regex
CompOption
ExecOption
(
Seq
Char
)
data
ReturnCode
Source
Instances
Eq
ReturnCode
Show
ReturnCode
type
WrapError
= (
ReturnCode
,
String
)
Source
Miscellaneous
unusedOffset
::
MatchOffset
Source
getVersion
::
Maybe
String
Source
return version of pcre used or Nothing if pcre is not available.
Medium level API functions
compile
Source
::
CompOption
Flags (summed together)
->
ExecOption
Flags (summed together)
->
Seq
Char
The regular expression to compile
->
IO
(
Either
(
MatchOffset
,
String
)
Regex
)
Returns: an error string and offset or the compiled regular expression
Compiles a regular expression
execute
Source
::
Regex
Compiled regular expression
->
Seq
Char
(Seq Char) 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
Source
::
Regex
compiled regular expression
->
Seq
Char
string to match
->
IO
(
Either
WrapError
(
Maybe
(
Seq
Char
,
Seq
Char
,
Seq
Char
, [
Seq
Char
])))
Returns: Nothing if no match, else (text before match, text after match, array of matches with 0 being the whole match)
execute match and extract substrings rather than just offsets
Constants for CompOption
compBlank
::
CompOption
Source
compAnchored
::
CompOption
Source
compAutoCallout
::
CompOption
Source
compCaseless
::
CompOption
Source
compDollarEndOnly
::
CompOption
Source
compDotAll
::
CompOption
Source
compExtended
::
CompOption
Source
compExtra
::
CompOption
Source
compFirstLine
::
CompOption
Source
compMultiline
::
CompOption
Source
compNoAutoCapture
::
CompOption
Source
compUngreedy
::
CompOption
Source
compUTF8
::
CompOption
Source
compNoUTF8Check
::
CompOption
Source
Constants for ExecOption
execBlank
::
ExecOption
Source
execAnchored
::
ExecOption
Source
execNotBOL
::
ExecOption
Source
execNotEOL
::
ExecOption
Source
execNotEmpty
::
ExecOption
Source
execNoUTF8Check
::
ExecOption
Source
execPartial
::
ExecOption
Source
Produced by
Haddock
version 2.4.2