Potential inconsistency in handling the maximum repetition size
Author: ViorelCreated Sep 23, 2026Updated Sep 23, 2026
The patterns a{10000} and a{10000000} correctly produce the error “invalid repetition size”. The maximum repetition size is 1000.
But a{1000000000}, which also exceeds the limit, does not give any error. It appears to be treated as a\{1000000000\}.
This behaviour seems inconsistent. The “invalid repetition size” error should probably occur in all cases of exceeding the maximum value.
Observed in RE2 2025-11-05.
Source: google/re2