Evaluated proc trim str { regsub -expanded -all {^[[:space:]]*} [regsub -expanded -all {[[:space:]]*$} $str ""] ""}