Welcome

首页 / 正则表达式 / JavaScript 去前后全脚半脚空格的正则

function trim(str)
{
return str.replace(/(^s*)|(s*$)/g, "");
}