regex midified to handle line endings on windows