util/patternMatch: break when pattern is found

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>