It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "Whoever commits an error and falls into a sin, and then regrets it, this regret is its expiation."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10491