macron-regex 0.1.2

Creates a new instance of Regex
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![cfg(feature = "regex")]

extern crate macron_regex;
use macron_regex::re;

#[test]
fn test_regex() {
    let re = re!(r"^Hello, \w+!$");
    assert!(re.is_match("Hello, World!"));
}

#[test]
fn test_regex_format() {
    let re = re!(r"^Hello, {}!$", "World");
    assert!(re.is_match("Hello, World!"));
}