| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Text.Regex.PCRE2
Description
The Text.Regex.PCRE2 module provides a backend for regular expressions. If you import this along with other backends, then you should do so with qualified imports, perhaps renamed for convenience.
This library uses the newer libpcre2, which supports UTF8-encoded strings by default.
The regular expression can be provided as a ByteString. The
regular expression and search string are passed as CStringLens
and may contain NUL bytes and do not need to end in a NUL byte.
ByteStrings are searched in place (via unsafeUseAsCStringLen).
A String will be converted into a CStringLen for processing.
Doing this repeatedly will be very inefficient.
The Text.Regex.PCRE2.String, Text.Regex.PCRE2.ByteString, and
Text.Regex.PCRE2.Wrap modules provide both the high-level interface
exported by this module and medium- and low-level interfaces that
return errors using Either structures.
Synopsis
- getVersion_Text_Regex_PCRE2 :: Version
- module Text.Regex.Base
- data Regex
- newtype CompOption = CompOption Word32
- newtype MatchOption = MatchOption Word32
- (=~) :: (RegexMaker Regex CompOption MatchOption source, RegexContext Regex source1 target) => source1 -> source -> target
- (=~~) :: (RegexMaker Regex CompOption MatchOption source, RegexContext Regex source1 target, MonadFail m) => source1 -> source -> m target
- unusedOffset :: MatchOffset
- getNumSubs :: Regex -> Int
- getVersion :: Maybe String
- compBlank :: CompOption
- compAnchored :: CompOption
- compEndAnchored :: CompOption
- compAllowEmptyClass :: CompOption
- compAltBSUX :: CompOption
- compAltExtendedClass :: CompOption
- compAltVerbnames :: CompOption
- compAutoCallout :: CompOption
- compCaseless :: CompOption
- compDollarEndOnly :: CompOption
- compDotAll :: CompOption
- compDupNames :: CompOption
- compExtended :: CompOption
- compExtendedMore :: CompOption
- compFirstLine :: CompOption
- compLiteral :: CompOption
- compMatchUnsetBackref :: CompOption
- compMultiline :: CompOption
- compNeverBackslashC :: CompOption
- compNoAutoCapture :: CompOption
- compNoAutoPossess :: CompOption
- compNoDotstarAnchor :: CompOption
- compNoUTFCheck :: CompOption
- compUngreedy :: CompOption
- compUTF :: CompOption
- matchBlank :: MatchOption
- matchAnchored :: MatchOption
- matchCopyMatchedSubject :: MatchOption
- matchDisableRecurseLoopCheck :: MatchOption
- matchEndAnchored :: MatchOption
- matchNotBOL :: MatchOption
- matchNotEOL :: MatchOption
- matchNotEmpty :: MatchOption
- matchNotEmptyAtStart :: MatchOption
- matchNoUTFCheck :: MatchOption
- matchPartialHard :: MatchOption
- matchPartialSoft :: MatchOption
Documentation
module Text.Regex.Base
Wrap, for =~ and =~~, types and constants
A compiled regular expression
Instances
newtype CompOption Source #
Constructors
| CompOption Word32 |
Instances
newtype MatchOption Source #
Constructors
| MatchOption Word32 |
Instances
(=~) :: (RegexMaker Regex CompOption MatchOption source, RegexContext Regex source1 target) => source1 -> source -> target Source #
(=~~) :: (RegexMaker Regex CompOption MatchOption source, RegexContext Regex source1 target, MonadFail m) => source1 -> source -> m target Source #
getNumSubs :: Regex -> Int Source #
getVersion :: Maybe String Source #
Version string of PCRE2 library
compUTF :: CompOption Source #