When a regex matches break cycle