made the regex for assert throw to do detect undefined