<?php
$t = 'abcdefg324gfdgfgfdg543rewhtrewhtth655';
echo preg_replace("/(.{10})/","\\1|",$t);
?>
不适用于含中文的串