fix trailing whitespace regex