From Sahih Bukhari (Hadith 4613):
Narrated `Aisha:This Verse: "Allah will not punish you for what is unintentional in your oaths." (5.89) was revealed about a man's statement (during his talk), "No, by Allah," and "Yes, by Allah
Reference: Bukhari 4613