Verbal Expressions implementation for Rust. See Verbal Expressions for detail.
Add the following to your Cargo.toml
:
[dependencies]
verbal_expressions = "0.1.0"
extern crate verbal_expressions;
use verbal_expressions::Verex;
fn main() {
let v = Verex::new()
.start_of_line()
.then("http")
.maybe("s")
.then("://")
.maybe("www.")
.anything_but_not(" ")
.end_of_line();
let url = "https://www.google.com";
assert!(v.is_match(url));
}
Copyright (c) 2014 woxtu
Licensed under the MIT license.