All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
There is no doubt that such an act is forbidden and a great sin, and whoever did so is obliged to sincerely repent to Allaah, and he should seek forgiveness as much as possible and regret this act. As regards marrying this woman, then there is no harm in it, because even though such an act is forbidden, it is not one of the marriage impediments.
Allaah Knows best.