Strip spaces from end of windowgram group patterns