-
Couldn't load subscription status.
- Fork 483
Open
Labels
Description
As an extension of the RegexBuilder::size_limit function, it might be useful to know the actual size taken by a compiled regular expression. A possible use for this is for when you want to process a number of untrusted regular expressions, and be assured that collectively they don't exceed a limit.
I propose that the size of the compiled program (the same one used when checking against the size_limit of the builder) be stored inside a regular expression struct, and be accessible through a new function Regex::approximate_size.