一个只取字符串后的数字的正则表达式


 <?php

 $s = "硬蛋网-15329018170";
 preg_match('/\d*$/',$s,$res);
 //print ($res[0]);
 
 echo $res[0];
?> 

相关