fixed undefined note error
fixed regex for dates