|
|
|
|
|
| Description |
| This exports instances of the high level API and the medium level
API of compile,execute, and regexec.
|
|
| Synopsis |
|
|
|
|
| Types
|
|
| data Regex |
| A compiled regular expression
| Instances | |
|
|
| MatchOffset |
|
| MatchLength |
|
| newtype CompOption |
| Constructors | | Instances | |
|
|
| newtype ExecOption |
| Constructors | | Instances | |
|
|
| data ReturnCode |
Instances | |
|
|
| type WrapError = (ReturnCode, String) |
|
| Miscellaneous
|
|
| unusedOffset :: MatchOffset |
|
| getVersion :: Maybe String |
| return version of pcre used or Nothing if pcre is not available.
|
|
| Medium level API functions
|
|
| compile |
|
|
| execute |
| :: 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 |
| :: 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 |
|
| 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 |
|
| Constants for ExecOption
|
|
| execBlank :: ExecOption |
|
| execAnchored :: ExecOption |
|
| execNotBOL :: ExecOption |
|
| execNotEOL :: ExecOption |
|
| execNotEmpty :: ExecOption |
|
| execNoUTF8Check :: ExecOption |
|
| execPartial :: ExecOption |
|
| Produced by Haddock version 0.8 |