Regex-lite on &[&str, &str, &str, ...]

I have a buffer which is represented as Vec<Vec<u8>> , which I can easily convert to a Vec<&str>.

I am wondering if I can run regex search over this Vec<&str> WITHOUT first concatenating it into a single String.

I.e. is it possible to run a regex over Vec<&str>.join("") without actually constructing the String ?

I wouldn't expect there to be anything in regex-lite (given there afaik isn't anything in regex for it either).
But if you go all the way down to regex-automata there is the Input in regex_automata - Rust struct, which is i believe where this kind of thing becomes possible.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.