It is narrated from Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) that indeed the Messenger of Allah (peace and blessings be upon him) said: "Whoever swears an oath regarding something, then sees a better alternative than it, he should offer expiation for his oath and choose the better alternative."
Hadith Referenceمسند الشهاب / 519
Hadith Gradingمحدثین:إسناده حسن
Hadith Takhrij«إسناده حسن ، وأخرجه النسائي : 3812، وابن ماجه : 2111، وابن حبان : 4347 ، وأحمد فى «مسنده» برقم: 7026»