Break when an environment matches and remove the hack that only allowed named matches from preg_match.