Added early exit for patterns that end in **