Performance improvement switching from regular expressions to minimal string search