Good question.. I’m not sure… Does anyone know??? Also what if the wife was attacked before marriage can a kohen marry such a girl??? What if you don’t know and you marry her is that an aviera???
Techncially, the Halacha requires that he divorce his wife in such a case. If it occurred before marriage then he is allowed to marry her if the attacker was a Kosher Jew (i.e. not a Goy, Mamzer, etc.). Some Poskim try to find Heterim to allow the Kohein to stay with his wife, for example if there were no actual Kosher Eidim. It does happen that a Kohein, unfortunately, has to divorce his wife in some cases like this.
I don’t have a source or anything, but I heard a story about a couple who got separated during the Holocaust, both survived and found each other, but they had to get divorced because he was a Kohen and she had been assaulted by a Nazi.
I asked a Shailo to a Rov about who a Kohen can marry, and he said a Kohen can marry a woman who has had Biah with another Jew, as long she never married that Jew and now divorced him (however if she was widowed he can marry her).
A Kohen cannot marry a woman who has had Biah with a goy, or her male family members.