#expressions #verbal #verex

verbal_expressions

Verbal Expressions implementation for Rust

1 unstable release

Uses old Rust 2015

0.1.0 Apr 18, 2016

#102 in #expressions

MIT license

12KB
346 lines

RustVerbalExpressions

Verbal Expressions implementation for Rust. See Verbal Expressions for detail.

Example

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));
}

License

Copyright (c) 2014 woxtu

Licensed under the MIT license.

Dependencies

~3.5MB
~76K SLoC