Why isn't there a size limit option? #161
-
|
The regex-automata crate has an option for limiting the size of the automata at build time. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
But |
Beta Was this translation helpful? Give feedback.
regex-automatahas a size limit option because the size of the input (the length of the sum of the patterns) is not proportional to the size of the compiled regex. The only reason why this is true is because of counted repetitions. i.e.,.{100}{100}{100}.But
AhoCorasickdoesn't support anything like that. So the way to apply a size limit is to limit the length of the patterns. Namely, the size of the resultingAhoCorasickvalue should be proportional to the sum of the lengths of the patterns.