It is narrated from Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever says «إِنْشَاءَاللَّهُ» while taking an oath is exempted from fulfilling that oath."
Hadith Referenceالسنن المأثورة / باب ما جاء في الصلاة على الراحلة / 104
Hadith Takhrijسنن ابی داؤد، الايمان والنذور، باب الاستثناء في اليمين، رقم : 3261 وقال الالباني صحيح، سنن ترمذی، النذور والايمان، باب ماجاء في الاستثناء في اليمين، رقم : 1531 وقال حسن۔