terminate matcher loop when match is found

It could, simplified it further, thanks.