Use .trim() instead of bulky RegExps.