He divorced her through the courts but that was during the period of purity following menses in which he had had intercourse with her; does she have the right to marry another man?
Talaaq that takes place during the period of purity following menses in which the husband had intercourse with a wife is valid according to the majority of scholars, although some of them were of the view that it does not count. But as the divorce was done through the sharee’ah courts, it is a valid divorce and you have the right to remarry once the ‘iddah has ended. If you have any problems then refer to the sharee’ah court.
And Allaah knows best.