> You can do that with a pair of substitutions:
> s/^\s+//;
> s/\s+$//;
It then notes, in an understated manner:
> You can also write that as a single substitution,
> although it turns out the combined statement is
> slower than the separate ones. That might not
> matter to you, though:
> s/^\s+|\s+$//g;