Pep Guardiola says allowing Joe Hart to leave Manchester City is his biggest regret from a decade in charge.