the IsRegex class allows polymorhic tools to be written that will work with a variety of regex back ends and text types
Methods
matchOnce :: re -> s -> Match sfinding the first match
matchMany :: re -> s -> Matches sfinding all matches
makeRegex :: (Functor m, Monad m, MonadFail m) => s -> m recompiling an RE, failing if the RE is not well formed
makeRegexWith :: (Functor m, Monad m, MonadFail m) => SimpleREOptions -> s -> m recomiling an RE, specifying the SimpleREOptions
makeSearchReplace :: (Functor m, Monad m, MonadFail m, IsRegex re s) => s -> s -> m (SearchReplace re s)compiling a SearchReplace template from the RE text and the template Text, failing if they are not well formed
makeSearchReplaceWith :: (Functor m, Monad m, MonadFail m, IsRegex re s) => SimpleREOptions -> s -> s -> m (SearchReplace re s)compiling a SearchReplace template specifying the SimpleREOptions for the RE
makeEscaped :: (Functor m, Monad m, MonadFail m) => (s -> s) -> s -> m reincorporate an escaped string into a compiled RE with the default options
makeEscapedWith :: (Functor m, Monad m, MonadFail m) => SimpleREOptions -> (s -> s) -> s -> m reincorporate an escaped string into a compiled RE with the specified SimpleREOptions
regexSource :: re -> sextract the text of the RE from the RE
Instances6IsRegex
IsRegex RE ByteStringDefined in regex-1.1.0.2 · Text.RE.TDFA.ByteString · orphanIsRegex RE ByteStringDefined in regex-1.1.0.2 · Text.RE.TDFA.ByteString.Lazy · orphanIsRegex RE StringDefined in regex-1.1.0.2 · Text.RE.TDFA.String · orphanIsRegex RE TextDefined in regex-1.1.0.2 · Text.RE.TDFA.Text · orphanIsRegex RE TextDefined in regex-1.1.0.2 · Text.RE.TDFA.Text.Lazy · orphanIsRegex RE (Seq Char)Defined in regex-1.1.0.2 · Text.RE.TDFA.Sequence · orphan