regexp2rust_macro

Crates.ioregexp2rust_macro
lib.rsregexp2rust_macro
version0.1.5
sourcesrc
created_at2022-11-29 08:25:45.472747
updated_at2023-03-17 03:58:37.288768
descriptionregexp(ecma262) to rust code macro
homepage
repositoryhttps://gitlab.com/hjiayz/regexp2rust.git
max_upload_size
id725213
size6,990,433
ppc (hjiayz)

documentation

README

example

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

for workspace

#Cargo.toml
[workspace]
members = ["yourcrate"]
resolver = "2"
Commit count: 21

cargo fmt