So just to be clear. If the woman and the man both were unmarried and they committed zinah. But after that felt guilty and did istighfar. They can get married to each other?

Yes, but after one menses period.