Make regexp trim substantially faster

Just noting that \s+ is substantially faster than \s* because the latter matches all strings, where as the former only matches when we want to trim.