regex-pderiv-0.1.0: Replaces/Enhances Text.Regex

Text.Regex.PDeriv.ExtPattern

Synopsis

Documentation

data EPat Source

The external pattern syntax (ERE syntax)

Constructors

EEmpty 
EGroup EPat

the group ( re )

EOr [EPat]

the union re|re

EConcat [EPat]

the concantenation rere

EOpt EPat Bool

the option re?, the last boolean flag indicates whether it is greedy

EPlus EPat Bool

the plus re+

EStar EPat Bool

the star re*

EBound EPat Int (Maybe Int) Bool

re{1:10}

ECarat

the ^ NOTE:shouldn't this must be top level?

EDollar

the $

EDot

the any char .

EAny [Char]

the character class [ a-z ]

ENoneOf [Char]

the negative character class [^a-z]

EEscape Char

backslash char

EChar Char

the non-escaped char

Instances

hasGroup :: EPat -> BoolSource

Function hasGroup tests whether an external pattern has ( ... ) (i.e. variable patterns in the internal pattern)