Fix failed tests on windows due to invalid regex