Description
Discussed in #845
Originally posted by x509cert March 6, 2022
hey folks, i posted this over on reddit and got my answer https://www.reddit.com/r/rust/comments/t80qe4/possible_bug_in_regex_and_unicode_characters/
I am not new to development, but new to Rust and the processes used by the Rust community, so please bear with me.
My issue is with the docs description of CompiledTooBig when you get this error:
thread 'main' panicked at 'called Result::unwrap()
on an Err
value: CompiledTooBig(10485760)', src\main.rs:10:103
the docs at https://docs.rs/regex/latest/regex/enum.Error.html#variant.CompiledTooBig state:
The compiled program exceeded the set size limit. The argument is the size limit imposed.
Ok, I get that, but I think many people would not understand this. Can we get the wording tweaked to something like:
Regexs are compiled down to an intermediate state, and the state for this regex exceeds the limit of nnnnn bytes. Either simplify rhe regex or increase the upper memory limit using https://docs.rs/regex/latest/regex/struct.RegexBuilder.html#method.size_limit, but be careful not to use too large a value.
Or something like that.