Allah, glorified be His praise, says: "Divorce (that can be revoked) is twice; then either retain her in an acceptable manner or release her in a good way." [Surah al-Baqarah: 229]
And He said: "And if he divorces her (a third time), then she is not lawful for him afterwards until she marries a husband other than him." [Surah al-Baqarah: 230]
Imam al-Shafi'i (may Allah have mercy on him) said: "So the Qur'an, and Allah knows best, indicates that whoever gives his wife three divorces, whether he has consummated the marriage with her or not, she will not be lawful for him until she marries a husband other than him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الخلع والطلاق / Q14950