Ingvar Stepanyan
Ingvar Stepanyan
Okay. Do you want to keep the issue open to see if others have thoughts on this?
I'm fine with either proposed solution; for generic bytes I do think that hex representation makes more sense, but I can also see cases where a pretty-printed output might be...
> In my benchmarks such precompiled regex turns out to be ~4x faster than native libc memmem on macOS and ~2x faster than https://docs.rs/memmem/0.1.1/memmem/ crate FWIW I found the reason...
@BurntSushi While it's understandable that saving/restoring compiled regular expressions is a hard issue and requires thorough design, I wonder if it would be possible to add at least string-based `serde::{Serialize,...
@BurntSushi Yeah I've done this myself, but newtypes, while widely used as a workaround for such situations in Rust, are still breaking API changes each time you need to introduce...
My use case is parsing/interpreting ASTs where regex is just one of possible values, and, while Regex instance is not exposed directly to the user, it's stored as part of...
Although if you add `Serialize` to it and publish as a separate crate, that would be better than nothing :) Just thought I'd suggest adding such support natively.
Another interesting option could be adding these traits to https://doc.rust-lang.org/regex/regex_syntax/enum.Expr.html and allowing to construct regex out of such `Expr`, but, as far as I understand, you don't want to make...
Hmm, okay, I just thought it's high-level enough to be exposed. Anyway, given that regex might be serialized in various representations, I tend to agree that separate crate should work...
> If someone wanted to work on this, I'd be willing to mentor it. @BurntSushi Do you think this is still feasible in face of regex internal refactorings you've been...