Trailing space only works for one of the | condition