我想preg_match_all()
这个:如何使用特殊的表达在PHP中使用preg_match_all
if(isset($matches[1])){
return $matches[1];
}else{
return false;
}
}
$lines = file('jason.txt');
$i=0;
foreach ($lines as $line_num => $line) {
$str_arr = getInbetweenStrings('"Vehicle":', ',"Buyer":', $line);
echo '<pre>';
print_r($str_arr);
}
的字符串是'“车辆”:“1992年凯美瑞的强壮男子CE”'? – Mohammad
展示你如何使用'getInbetweenStrings'功能 – RomanPerekhrest
这是一个数组 “QuoteRequestId” 中:343816132, \t \t “车辆”: “1992年凯美瑞强壮男子CE”, \t \t “买家”: “卡罗来纳州车身”, –