Convert deprecated ereg() to preg_match() calls. #1088