for ($string) { s/^\s+//; s/\s+$//; } [download]
In reply to Re: regexp problem by SamCG in thread regexp problem by jeanluca