Would trim() make sense instead of the whitespace regex?