Safe Haskell | None |
---|---|
Language | Haskell2010 |
Text.Regex.PCRE.Text.Lazy
Contents
- data Regex :: *
- type MatchOffset = Int
- type MatchLength = Int
- newtype CompOption :: * = CompOption CInt
- newtype ExecOption :: * = ExecOption CInt
- data ReturnCode :: *
- type WrapError = (ReturnCode, String)
- unusedOffset :: MatchOffset
- getVersion :: Maybe String
- compile :: CompOption -> ExecOption -> Text -> IO (Either (MatchOffset, String) Regex)
- execute :: Regex -> Text -> IO (Either WrapError (Maybe (Array Int (MatchOffset, MatchLength))))
- regexec :: Regex -> Text -> IO (Either WrapError (Maybe (Text, Text, Text, [Text])))
- 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
- execBlank :: ExecOption
- execAnchored :: ExecOption
- execNotBOL :: ExecOption
- execNotEOL :: ExecOption
- execNotEmpty :: ExecOption
- execNoUTF8Check :: ExecOption
- execPartial :: ExecOption
Types
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
CompOption CInt |
newtype ExecOption :: * #
Constructors
ExecOption CInt |
data ReturnCode :: * #
Instances
type WrapError = (ReturnCode, String) #
Miscellaneous
getVersion :: Maybe String #
return version of pcre used or Nothing if pcre is not available.
Medium level API functions
Arguments
:: CompOption | (summed together) |
-> ExecOption | (summed together) |
-> Text | The regular expression to compile |
-> IO (Either (MatchOffset, String) Regex) | Returns: the compiled regular expression |
Compiles a regular expression
Arguments
:: Regex | Compiled regular expression |
-> Text | Text to match against |
-> IO (Either WrapError (Maybe (Array Int (MatchOffset, MatchLength)))) | Returns: |
Matches a regular expression against a string
Arguments
:: Regex | Compiled regular expression |
-> Text | Text to match against |
-> IO (Either WrapError (Maybe (Text, Text, Text, [Text]))) | Returns: |
Matches a regular expression against a string
CompOption flags
compBlank :: CompOption #
compExtra :: CompOption #
compUTF8 :: CompOption #
ExecOption flags
execBlank :: ExecOption #