Updated regex for removing trailing whitespace

It now takes care of trailing tabs as well as trailing spaces