remove else expresion when preg_match fails