Lang - Test
extern crate regex;
use regex::Regex;
fn main() {
let re = Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap();
println!("test");
assert!(re.is_match("2014-01-01"));
}
|
|
Hello, World.
extern crate regex;
use regex::Regex;
fn main() {
let re = Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap();
println!("test");
assert!(re.is_match("2014-01-01"));
}
|
|
Hello, World.