Trait rec::Quantifier

source ·
pub trait Quantifier {
    fn to_regexp(&self) -> String;

    fn lazy(&self) -> String { ... }
}
Expand description

Specifies how often an element may be repeated.

By default, a Quantifier is greedy, i.e. it will match as many elements as possible. See lazy for how to make a greedy Quantifier lazy, i.e. match as few elements as possible.

Required Methods§

Converts self to its appropriate Regexp.

Provided Methods§

Makes self lazy, i.e. match as few elements as possible.

Examples
use rec::{Quantifier, SOME};

assert_eq!(SOME.lazy(), "+?");

Implementations on Foreign Types§

Implementors§