Ikrimah narrates from Sayyiduna Abdullah bin Abbas (may Allah be pleased with him) that divorce is of four kinds: 1. two lawful ways, 2. two unlawful ways. (The lawful:) 1. to divorce in purity without intercourse, 2. or to divorce at the time when the pregnancy has become evident. The unlawful ways: 1. to divorce during menstruation, 2. to divorce after intercourse while not knowing about pregnancy.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الخلع والطلاق / 14916