s/^\s+|\s+$//g [download]
In reply to Re: Question about regex performance by choroba in thread Question about regex performance by ted.byers