rm trailing whitespace from match (since on Windows there is a trailing \r)