2010-06-24 jsでphpとおなじ動作のtrim PHP JavaScript strSrc = strSrc.replace(/(^[ \r\n\t]+)|([ \r\n\t]+$)/g, "");