Crates.io | regexp2rust_macro |
lib.rs | regexp2rust_macro |
version | 0.1.5 |
source | src |
created_at | 2022-11-29 08:25:45.472747 |
updated_at | 2023-03-17 03:58:37.288768 |
description | regexp(ecma262) to rust code macro |
homepage | |
repository | https://gitlab.com/hjiayz/regexp2rust.git |
max_upload_size | |
id | 725213 |
size | 6,990,433 |
use regexp2rust_macro::regex2rust;
regex2rust!( foo = "12345(?<abc>123)" "ui");
assert_eq!(foo::exec(" 12345123"),[Some([1,9]),Some([6,9])]);
assert_eq!(foo::Group::abc as usize,1usize);
assert_eq!(foo::exec(" 12345123")[foo::Group::abc as usize],Some([6,9]));
#Cargo.toml
[workspace]
members = ["yourcrate"]
resolver = "2"