【正则】Perl式正则 完整匹配单词 的正则怎么写(前瞻) 本帖最后由 default7 于 2014-10-27 09:30:18 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function getValue($str){ return preg_match('/(?:^|\D)(\d{8})(?:\D|$)/', $str, $matches) ? $matches[1] : '';}0 10208899 => 102088991 #10208899 => 102088992 #test^10208899 => 102088993 #ff1020889900 => 4 #0010208899 => 5 #1020^10208899a => 102088996 #5566880&10208899f => 102088997 test?#10208899 => 102088998 #10208899. => 10208899 PhpVirtualBox客户端 PHP中的onclick问题 关于include中使用define的问题 100分求解php5.2连接sql2005的问题(实在没办法了) MS的一道面试题[ZT] 搜索結果怎麼顯示部分內容? 请教如何在php程序中加入浏览器控件? 请CSDN尊重开源精神-BLOG使用FCKeiditor在线编辑器竟然去掉了about项。 简单问题,在线等如何在html中引用php的变量? 如何通过javascript实现动态计算 求教:获取li标签中变量,htm和php变量互传的问题 php tools for visual studio 2013 问题
{
return preg_match('/(?:^|\D)(\d{8})(?:\D|$)/', $str, $matches) ? $matches[1] : '';
}
0 10208899 => 10208899
1 #10208899 => 10208899
2 #test^10208899 => 10208899
3 #ff1020889900 =>
4 #0010208899 =>
5 #1020^10208899a => 10208899
6 #5566880&10208899f => 10208899
7 test?#10208899 => 10208899
8 #10208899. => 10208899