RRegex.PCRE
- data Regex
- compile :: String -> Int -> IO (Either (Int, String) Regex)
- execute :: Regex -> String -> Int -> IO (Maybe (Array Int (Int, Int)))
- executeExtract :: Regex -> String -> Int -> IO (Maybe (String, String, Array Int String))
- 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
Documentation
A compiled regular expression
Arguments
:: 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
Arguments
:: Regex | Compiled regular expression |
-> String | String to match against |
-> Int | Options |
-> IO (Maybe (Array Int (Int, Int))) | Returns: |
Matches a regular expression against a string
Arguments
:: 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
getVersion :: Maybe StringSource
return version of pcre used or Nothing if pcre is not available.