Safe Haskell | None |
---|---|
Language | Haskell2010 |
Regular expression matching via PCRE through the FFI
- data Regexp
- data MatchResult
- = MatchFailed
- | MatchAborted
- | MatchSucceeded [(Int, Int)]
- newRegexp :: Text -> Bool -> Either String Regexp
- match :: Regexp -> Text -> MatchResult
- rmatch :: Regexp -> Text -> MatchResult
- pcreVersion :: String
- verifyPCRE :: IO ()
Documentation
Compiling
Compile a regular expression pattern into a Regexp
value, or return an
error description if the pattern is malformed.
Matching
match :: Regexp -> Text -> MatchResult Source
Perform regular expression matching.
rmatch :: Regexp -> Text -> MatchResult Source
Perform regular expression matching, returning the rightmost match.
Miscellaneous
Return the current version of the linked PCRE library.
verifyPCRE :: IO () Source
Verify the bound PCRE library was built with the required features.