AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Creates a back-end implementation, conforming to http://hackage.haskell.org/packages/archive/regex-base/latest/doc/html/Text-Regex-Base-RegexLike.html.
CAVEATS
- The underlying polymorphic (in terms of the base-type of the list of input data)
ExtendedRegEx
-engine is never going to be a drop-in replacement for other regex-engines, so this standard interface has only been implemented for traditional input data-type [Char
]. - The standard interface requires many Haskell-extensions, but since this implementation is just a thin layer over the underlying portable polymorphic
ExtendedRegEx
-engine, the latter can still be used directly, where any of these extensions are unavailable.
- type MatchSpan = (MatchOffset, MatchLength)
- type RegExOptsChar = RegExOpts ExtendedRegExChar
- toZeroIndexedArray :: [e] -> Array Int e
- (=~) :: RegexContext RegExOptsChar InputData target => InputData -> String -> target
Types
Type-synonyms
type MatchSpan = (MatchOffset, MatchLength)Source
type RegExOptsChar = RegExOpts ExtendedRegExCharSource
Defines a specific instance of the polymorphic base-type.
Functions
toZeroIndexedArray :: [e] -> Array Int eSource
Convert the specified list, into a zero-indexed array.
Operators
:: RegexContext RegExOptsChar InputData target | |
=> InputData | The input data. |
-> String | The string from which to read the regex-specification. |
-> target | The polymorphic return-type. |
- Match-operator.
- The polymorphic return-type is resolved by the caller's RegexLike.RegexContext.