时间:2021-07-01 10:21:17 帮助过:93人阅读
$s=你的串
preg_match_all('/Array\(.+\)/sU',$s,$m);
print_r($m);
$s =<<< TXTArray
var switchPara = new Array(26,0,1,24,25,2,6,8,2,2,4);
var VlanTagGlobalList = new Array(
0, 1, 1,
0, 1, 1,
0, 1, 1,
0, 1, 1,
0, 1, 1,
0, 1, 1,
0, 1, 1,
0, 1, 1,
0, 1, 1,
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 1,
0, 1, 0,
0, 0, 99,
0, 0, 99,
0,0 );
var VlanTagGlobalTList = new Array(
0, 99,
0, 99,
0, 99,
0, 99,
0, 99,
0, 99,
0,0 );
var userLevel=window.parent.user[1];
//-->
TXT;
preg_match_all('/new Array\((.+?)\)/s', $s, $r);
print_r($r[1]);