regex-0.10.0.2: Toolkit for regex-base

Safe HaskellNone
LanguageHaskell2010

Text.RE.TDFA.RE

Contents

Synopsis

RE Type

regexType :: RegexType Source #

some functions in the Text.RE.TestBench need the back end to be passed dynamically as a RegexType parameters: use regexType fpr this backend

reOptions :: RE -> REOptions Source #

extract the REOptions from the RE

reSource :: RE -> String Source #

extract the RE source string from the RE

reCaptureNames :: RE -> CaptureNames Source #

extract the CaptureNames from the RE

reRegex :: RE -> Regex Source #

extract the back end compiled Regex type from the RE

REOptions Type

type REOptions = REOptions_ RE CompOption ExecOption Source #

and the REOptions for this back end (see Text.RE.Types.REOptions for details)

noPreludeREOptions :: REOptions Source #

the default REOptions but with no RE macros defined

Compiling Regular Expressions

compileRegex :: (Functor m, Monad m) => String -> m RE Source #

compile a String into a RE with the default options, generating an error if the RE is not well formed

compileRegexWith :: (Functor m, Monad m) => SimpleREOptions -> String -> m RE Source #

compile a String into a RE using the given SimpleREOptions, generating an error if the RE is not well formed

compileRegexWithOptions :: (IsOption o RE CompOption ExecOption, Functor m, Monad m) => o -> String -> m RE Source #

compile a String into a RE using the given SimpleREOptions, generating an error if the RE is not well formed

Compiling Search-Replace Templates

compileSearchReplace :: (Monad m, Functor m, IsRegex RE s) => String -> String -> m (SearchReplace RE s) Source #

compile a SearchReplace template generating errors if the RE or the template are not well formed -- all capture references being checked

compileSearchReplaceWith :: (Monad m, Functor m, IsRegex RE s) => SimpleREOptions -> String -> String -> m (SearchReplace RE s) Source #

compile a SearchReplace template, with simple options, generating errors if the RE or the template are not well formed -- all capture references being checked

compileSearchReplaceWithREOptions :: (Monad m, Functor m, IsRegex RE s) => REOptions -> String -> String -> m (SearchReplace RE s) Source #

compile a SearchReplace template, with general options, generating errors if the RE or the template are not well formed -- all capture references being checked

Escaping String

escape :: (Functor m, Monad m) => (String -> String) -> String -> m RE Source #

convert a string into a RE that matches that string, and apply it to an argument continuation function to make up the RE string to be compiled

escapeWith :: (Functor m, Monad m) => SimpleREOptions -> (String -> String) -> String -> m RE Source #

convert a string into a RE that matches that string, and apply it to an argument continuation function to make up the RE string to be compiled with the default options

escapeWithOptions :: (IsOption o RE CompOption ExecOption, Functor m, Monad m) => o -> (String -> String) -> String -> m RE Source #

convert a string into a RE that matches that string, and apply it to an argument continuation function to make up the RE string to be compiled the given options

escapeREString :: String -> String Source #

Convert a string into a regular expression that will amtch that string

Macros Standard Environment

prelude :: Macros RE Source #

the standard table of Macros used to compile REs (which can be extended or replace: see Text.RE.TestBench)

preludeEnv :: MacroEnv Source #

the standard MacroEnv for this back end (see Text.RE.TestBench)

preludeTestsFailing :: [MacroID] Source #

the macros in the standard environment that are failing their tests (checked by the test suite to be empty)

preludeTable :: String Source #

a table the standard macros in markdown format

preludeSummary :: PreludeMacro -> String Source #

a summary of the macros in the standard environment for this back end in plain text

preludeSources :: String Source #

a listing of the RE text for each macro in the standard environment with all macros expanded to normal form

preludeSource :: PreludeMacro -> String Source #

the prolude source of a given macro in the standard environment

unpackSimpleREOptions :: SimpleREOptions -> REOptions Source #

convert a universal SimpleReOptions into the REOptions used by this back end

The Quasi Quoters

re :: QuasiQuoter Source #

the [re| ... |] and [ed| ... /// ... |] quasi quoters

reMS :: QuasiQuoter Source #

the [re| ... |] and [ed| ... /// ... |] quasi quoters

reMI :: QuasiQuoter Source #

the [re| ... |] and [ed| ... /// ... |] quasi quoters

reBS :: QuasiQuoter Source #

the [re| ... |] and [ed| ... /// ... |] quasi quoters

reBI :: QuasiQuoter Source #

the [re| ... |] and [ed| ... /// ... |] quasi quoters

reMultilineSensitive :: QuasiQuoter Source #

the [re| ... |] and [ed| ... /// ... |] quasi quoters

reMultilineInsensitive :: QuasiQuoter Source #

the [re| ... |] and [ed| ... /// ... |] quasi quoters

reBlockSensitive :: QuasiQuoter Source #

the [re| ... |] and [ed| ... /// ... |] quasi quoters

reBlockInsensitive :: QuasiQuoter Source #

the [re| ... |] and [ed| ... /// ... |] quasi quoters

re_ :: QuasiQuoter Source #

the [re| ... |] and [ed| ... /// ... |] quasi quoters

cp :: QuasiQuoter Source #

quasi quoter for CaptureID ([cp|0|],[cp|y|], etc.)

Orphan instances