|
|
|
|
| Synopsis |
|
|
|
| Documentation |
|
| data Regex |
| A compiled regular expression
| Instances | |
|
|
| compile |
| :: String | The regular expression to compile
| | -> Int | Flags (summed together)
| | -> IO (Either (Int, String) Regex) | Returns: an error string and offset or the compiled regular expression
| | Compiles a regular expression
|
|
|
| execute |
| :: Regex | Compiled regular expression
| | -> String | String to match against
| | -> Int | Options
| | -> IO (Maybe (Array Int (Int, Int))) | 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
|
|
|
| executeExtract |
| :: Regex | compiled regular expression
| | -> String | string to match
| | -> Int | Flags (summed together)
| | -> IO (Maybe (String, String, Array Int 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
|
|
|
| pcreCaseless :: Int |
|
| pcreMultiline :: Int |
|
| pcreDotall :: Int |
|
| pcreExtended :: Int |
|
| pcreAnchored :: Int |
|
| pcreDollarEndonly :: Int |
|
| pcreExtra :: Int |
|
| pcreNotbol :: Int |
|
| pcreNoteol :: Int |
|
| pcreUngreedy :: Int |
|
| pcreNotempty :: Int |
|
| pcreUtf8 :: Int |
|
| numSubs :: Regex -> IO Int |
|
| getVersion :: Maybe String |
| return version of pcre used or Nothing if pcre is not available.
|
|
| Produced by Haddock version 2.1.0 |