It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Swearing an oath ends either in breaking it or in regret."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 19839
Asim bin Muhammad bin Zayd says: I heard my father say that Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) said: The oath is either a cause of sin or a cause of regret.
Al-Bukhari said: The narration of Umar is more correct.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 19840