时间:2021-07-01 10:21:17 帮助过:26人阅读
echo preg_replace('/[^a-z]+$/i','','123456ew789');
$s = '3ewf232t4a';
echo strrev(preg_replace('/\d+/', '', strrev($s), 1));
哦,上面那个有点问题。更正一下:
echo strrev(preg_replace('/^\d+/', '', strrev($s), 1));