$str = 'g_arrSeryPos_2 = Number(297);g_arrSeryMapList[297] = new Array(2,"","中国甲","","#DB7D00","",1,"http://football.sportscn.com
/spain/");';if(preg_match("/.*?new\s+Array\((\d)\,.*?\,\"(.*?)\".*/i",$str,$re))
{
echo "$re[1]==>$re[2] \n";}else{
echo "Unmatched. \n";}
/spain/");';if(preg_match("/.*?new\s+Array\((\d)\,.*?\,\"(.*?)\".*/i",$str,$re))
{
echo "$re[1]==>$re[2] \n";}else{
echo "Unmatched. \n";}
解决方案 »
- 博俊网络第三期培训开始了!
- 如何防止别人用iframe调用?
- 安装wampserver时,端口已经更改了,但是打开localhost出现空白页,并报出以下错误是什么原因?
- js 文件中 var datapage = "http://localhost/mytrain/traindata.php?"后面引号的作用是什么
- 微信公众平台下面的工具栏怎么去掉
- 一个菜鸟的菜问题~~~~~~~~~~~~~~~~~~
- 哪里有源代码库下载?
- 如何用PHP语句删掉MYSQL数据库里的一个表呢?
- PHP4初级问题
- jquery ajax的简单应用,但是返回值就是初步来!
- 100分求助:PHP中的escape和unescape函数
- 再求一个替换正则
$string = 'g_arrSeryPos_2 = Number(297);g_arrSeryMapList[297] = new Array(2,"","中国甲,"","#DB7D00","",1,"http: //football.sportscn.com/spain/");';
$p = '/.*=\s?new\s?Array\((\d+),\"\",\"(.*),\".*/Ui';
preg_match($p, $string, $matches);
print_r($matches);