Function combine::regex::match_ [] [src]

pub fn match_<R, I>(regex: R) -> Match<R, I> where
    R: Regex<I::Range>,
    I: FullRangeStream

Matches regex on the input returning the entire input if it matches. Never consumes any input.

extern crate regex;
extern crate combine;
use regex::Regex;
use combine::Parser;
use combine::regex::match_;

fn main() {
    let regex = Regex::new("[:alpha:]+").unwrap();
    assert_eq!(
        match_(&regex).parse("abc123"),
        Ok(("abc123", "abc123"))
    );
}