#if __GLASGOW_HASKELL__ >= 800
#endif
module Text.RE.PCRE
(
(*=~)
, (?=~)
, (*=~/)
, (?=~/)
, (=~)
, (=~~)
, Matches
, matchesSource
, allMatches
, anyMatches
, countMatches
, matches
, Match
, matchSource
, matched
, matchedText
, RE
, SimpleREOptions(..)
, reSource
, compileRegex
, compileRegexWith
, escape
, escapeWith
, escapeREString
, module Text.RE.ZeInternals.PCRE
, module Text.RE.ZeInternals.SearchReplace.PCRE
, module Text.RE.PCRE.ByteString
, module Text.RE.PCRE.ByteString.Lazy
, module Text.RE.PCRE.Sequence
, module Text.RE.PCRE.String
) where
import qualified Text.Regex.Base as B
import Text.RE
import Text.RE.ZeInternals.AddCaptureNames
import Text.RE.ZeInternals.SearchReplace.PCRE
import Text.RE.ZeInternals.PCRE
import qualified Text.Regex.PCRE as PCRE
import Text.RE.PCRE.ByteString()
import Text.RE.PCRE.ByteString.Lazy()
import Text.RE.PCRE.Sequence()
import Text.RE.PCRE.String()
import Text.RE.IsRegex
import Text.RE.REOptions
(*=~) :: IsRegex RE s
=> s
-> RE
-> Matches s
(*=~) bs rex = addCaptureNamesToMatches (reCaptureNames rex) $ matchMany rex bs
(?=~) :: IsRegex RE s
=> s
-> RE
-> Match s
(?=~) bs rex = addCaptureNamesToMatch (reCaptureNames rex) $ matchOnce rex bs
(?=~/) :: IsRegex RE s => s -> SearchReplace RE s -> s
(?=~/) = flip searchReplaceFirst
(*=~/) :: IsRegex RE s => s -> SearchReplace RE s -> s
(*=~/) = flip searchReplaceAll
(=~) :: ( B.RegexContext PCRE.Regex s a
, B.RegexMaker PCRE.Regex PCRE.CompOption PCRE.ExecOption s
)
=> s
-> RE
-> a
(=~) bs rex = B.match (reRegex rex) bs
(=~~) :: ( Monad m
, B.RegexContext PCRE.Regex s a
, B.RegexMaker PCRE.Regex PCRE.CompOption PCRE.ExecOption s
)
=> s
-> RE
-> m a
(=~~) bs rex = B.matchM (reRegex rex) bs