After the change to the regular expression, the call to .trim() could be removed