<?php echo preg_replace('~^[\pZ\pC]+|[\pZ\pC]+$|(?! )[\pZ\pC]~u', '', 'abc def ghi ').PHP_EOL; echo preg_replace('/^\s+|\s+$|[^\S ]/u', '', 'abc def ghi ');
You have javascript disabled. You will not be able to edit any code.