Don't leave carriage return when removing .*\r from string