yi-language-0.19.0: Collection of language-related Yi libraries.
Safe HaskellNone
LanguageHaskell2010

Yi.Regex

Synopsis

Documentation

data SearchOption Source #

Constructors

IgnoreCase

Compile for matching that ignores char case

NoNewLine

Compile for newline-insensitive matching

QuoteRegex

Treat the input not as a regex but as a literal string to search for.

Instances

Instances details
Eq SearchOption Source # 
Instance details

Defined in Yi.Regex

Generic SearchOption Source # 
Instance details

Defined in Yi.Regex

Associated Types

type Rep SearchOption :: Type -> Type Source #

Binary SearchOption Source # 
Instance details

Defined in Yi.Regex

type Rep SearchOption Source # 
Instance details

Defined in Yi.Regex

type Rep SearchOption = D1 ('MetaData "SearchOption" "Yi.Regex" "yi-language-0.19.0-8dDnxQRDjG1jR7I8dgNB1" 'False) (C1 ('MetaCons "IgnoreCase" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NoNewLine" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "QuoteRegex" 'PrefixI 'False) (U1 :: Type -> Type)))

data SearchExp Source #

Instances

Instances details
Binary SearchExp Source # 
Instance details

Defined in Yi.Regex

emptyRegex :: Regex Source #

The regular expression that matches nothing.

regexEscapeString :: String -> String Source #

Return an escaped (for parseRegex use) version of the string.

reversePattern :: (Pattern, (t, DoPa)) -> (Pattern, (t, DoPa)) Source #

Reverse a pattern. Note that the submatches will be reversed as well.

(=~) :: (RegexMaker Regex CompOption ExecOption source, RegexContext Regex source1 target) => source1 -> source -> target #

newtype AllTextSubmatches (f :: Type -> Type) b #

Constructors

AllTextSubmatches 

Fields

class Extract source => RegexLike regex source where #

Minimal complete definition

Nothing

Methods

matchAll :: regex -> source -> [MatchArray] #

matchOnceText :: regex -> source -> Maybe (source, MatchText source, source) #

makeRegex :: RegexMaker regex compOpt execOpt source => source -> regex #

makeRegexOptsM :: (RegexMaker regex compOpt execOpt source, MonadFail m) => compOpt -> execOpt -> source -> m regex #

defaultCompOpt :: RegexOptions regex compOpt execOpt => compOpt #

defaultExecOpt :: RegexOptions regex compOpt execOpt => execOpt #

data CompOption #

Instances

Instances details
Read CompOption 
Instance details

Defined in Text.Regex.TDFA.Common

Show CompOption 
Instance details

Defined in Text.Regex.TDFA.Common

RegexOptions Regex CompOption ExecOption 
Instance details

Defined in Text.Regex.TDFA.Common

Methods

blankCompOpt :: CompOption

blankExecOpt :: ExecOption

defaultCompOpt :: CompOption #

defaultExecOpt :: ExecOption #

setExecOpts :: ExecOption -> Regex -> Regex

getExecOpts :: Regex -> ExecOption

data Regex #

Instances

Instances details
RegexOptions Regex CompOption ExecOption 
Instance details

Defined in Text.Regex.TDFA.Common

Methods

blankCompOpt :: CompOption

blankExecOpt :: ExecOption

defaultCompOpt :: CompOption #

defaultExecOpt :: ExecOption #

setExecOpts :: ExecOption -> Regex -> Regex

getExecOpts :: Regex -> ExecOption