Enum redfa::regex::Regex [] [src]

pub enum Regex<T> {
    Null,
    Empty,
    Except(Vec<T>),
    Alt(Vec<T>, Vec<Regex<T>>),
    And(Vec<Regex<T>>),
    Not(Box<Regex<T>>),
    Cat(Vec<Regex<T>>),
    Kleene(Box<Regex<T>>),
}

A regular expression over the alphabet T.

Variants

The null set. This never matches anything.

The empty string (matches exactly "").

Matches any single character except the listed ones.

Alternation (also known as disjunction). Matches any of the contained characters, as well as any string matched by a contained regex.

Conjunction. Matches iff all contained regexes match.

Negation. Matches iff the contained regex does not match.

Concatenation. Matches iff the contained regexes match in sequence.

Kleene closure. Matches zero or more repetitions of the contained regex.

Methods

impl<T> Regex<T>
[src]

Tests whether a regular expression is nullable, i.e. whether it matches the empty string.

Trait Implementations

impl<T: PartialOrd> PartialOrd for Regex<T>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: Ord> Ord for Regex<T>
[src]

This method returns an Ordering between self and other. Read more

impl<T: PartialEq> PartialEq for Regex<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Eq> Eq for Regex<T>
[src]

impl<T: Debug> Debug for Regex<T>
[src]

Formats the value using the given formatter.

impl<T: Clone> Clone for Regex<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Ord> Normalize for Regex<T>
[src]

impl FromStr for Regex<char>
[src]

The associated error which can be returned from parsing.

Parse a string as a regular expression.

impl<T: Ord + Clone> Differentiable<T> for Regex<T>
[src]