 | regex-pcre-builtin-0.94.2.1.7.7: Replaces/Enhances Text.Regex | Contents | Index |
|
|
|
|
|
| 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 | |
|
|
| 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 | | 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 |
|
|
| regexec |
| :: Regex | compiled regular expression
| | -> String | string to match
| | -> IO (Either WrapError (Maybe (String, String, String, [String]))) | 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 2.7.2 |