regexdot-0.10.2.1: A /polymorphic/, POSIX, extended regular-expression engine.

RegExDot.DSL

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
  • Defines binary operators, to form a Domain-specific Language, by which to compose RegEx.Concatenations from Patterns.
  • Each operator quantifies the specified Pattern, & prepends it to the specified Concatenation.
TODO
Could [] & Meta be instances of a type-class which has methods (-:) etc., allowing the former to prepend captureGroup & the latter Require ?

Synopsis

Functions

Operators

(-:) :: Pattern a -> Concatenation a -> Concatenation aSource

Prepend an unrepeated Pattern, to the specified Concatenation.

(?:) :: Pattern a -> Concatenation a -> Concatenation aSource

Prepend an optional Pattern, to the specified Concatenation.

(??:) :: Pattern a -> Concatenation a -> Concatenation aSource

A non-greedy version of ?:.

(*:) :: Pattern a -> Concatenation a -> Concatenation aSource

Prepend a Pattern, repeatable zero or more times, to the specified Concatenation.

(*?:) :: Pattern a -> Concatenation a -> Concatenation aSource

A non-greedy version of *:.

(+:) :: Pattern a -> Concatenation a -> Concatenation aSource

Prepend a Pattern, repeatable one or more times, to the specified Concatenation.

(+?:) :: Pattern a -> Concatenation a -> Concatenation aSource

A non-greedy version of +:.

(#->#:) :: (Pattern a, RepetitionBounds) -> Concatenation a -> Concatenation aSource

Prepend a Pattern, repeated a range of times, to the specified Concatenation.

(#->#?:) :: (Pattern a, RepetitionBounds) -> Concatenation a -> Concatenation aSource

A non-greedy version of '#->#:'.

(#->:) :: (Pattern a, Repetitions) -> Concatenation a -> Concatenation aSource

Prepend a Pattern, repeated at least a specified number of times, to the specified Concatenation.

(#->?:) :: (Pattern a, Repetitions) -> Concatenation a -> Concatenation aSource

A non-greedy version of '#->:'.

(#:) :: (Pattern a, Repetitions) -> Concatenation a -> Concatenation aSource

Prepend a Pattern, repeated a precise number of times, to the specified Concatenation.

(<~>)Source

Arguments

:: (Maybe Anchor, Maybe Anchor)

A specification for the anchors required around the expression.

-> Concatenation a

The bare list of repeatable patterns to anchor.

-> ExtendedRegEx a

The completed regex.