Abundant regex, shortest: Avoid multiplication for encoding next iteration's state; length-=7