A better regex, and cope if the regex isn't matched