Ibrahim (may Allah have mercy on him) narrates from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) concerning a man who said to his wife: "If she does such-and-such, she is divorced," and she then does it. He said: "It is one divorce, and the husband has the right to take her back."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الخلع والطلاق / 15090