Use trim() instead of own regexp.