2008-07-18 全角スペース 半角スペース trim PHP $trimd = preg_replace('/^[ ]*(.*?)[ ]*$/u', '$1', $input);http://www.phppro.jp/qa/411