With ^(1|1|2|2)$ the tool will currently report 2 backtracks even though there can only be 1. This is because it doesn't check to see if the same input string could be used for both backtracks, which it can't.
^(1|1|2|2|[12])$ should result in 3.
Not sure how expensive this could be to calculate.
With
^(1|1|2|2)$
the tool will currently report 2 backtracks even though there can only be 1. This is because it doesn't check to see if the same input string could be used for both backtracks, which it can't.^(1|1|2|2|[12])$
should result in 3.Not sure how expensive this could be to calculate.