A rust macro that allows regular expression creation through independent files. Allows fully typed named groups.
updated readme
1 file changed, +12 -0
+12-0README.md
| @@ -35,6 +35,18 @@ The abstract structure for matches within the regex_macro library contains `star | ||
| 35 | 35 | |
| 36 | 36 | ## The events example |
| 37 | 37 | |
| 38 | +### event.rs | |
| 39 | + | |
| 40 | +```rust | |
| 41 | +use regex_macro::load_regex_files; | |
| 42 | + | |
| 43 | +fn main() { | |
| 44 | + load_regex_files!("tests/regex"); | |
| 45 | + let events = Event::vec_from_file("tests/samples/events.txt").unwrap(); | |
| 46 | + println!("{}", serde_json::to_string_pretty(&events).unwrap()); | |
| 47 | +} | |
| 48 | +``` | |
| 49 | + | |
| 38 | 50 | ### events.txt |
| 39 | 51 | |
| 40 | 52 | ```text |