veeshi
veeshi
Thanks, that's in depth enough for me to have a real stab at it hopefully in the next week or so!
We have a similar use case where we are automatically generating hundreds of pages of markdown docs and it is quite painful and error prone to copy in those sections...
So in the Rust regex crate there is a default size limit to the number of bytes occupied by a regex in memory. It is 10mb, which can be [configured](https://docs.rs/regex/latest/regex/struct.RegexBuilder.html#method.size_limit)....
To be honest what inflates the size is embedding Unicode character classes and expanding repetitions, but in production we haven't see regexes anywhere near that limit. In Wirefilter Cloudflare also...
The purpose was to use in places where we don't want to allocate and need static string slices.