Improved parseAttendance by using regex