This regex finds the substrings of the formats: hh:mm (0 <= hh <= 23; 0 <= mm <= 59) or h:mm am|pm (0 <= 12; 0 <= mm <= 59)