let str = `
<h1>html代码</h1>
<pre class="brush:html;toolbar:false;">
<html>
<head>
<title>什么</title>
</head>
<body>
什么什么
</body>
</html>
</pre>
<h1>css代码</h1>
<pre class="brush:css;toolbar:false;">
#div{
background:#dddeee; border:1px solid green;}
</pre>
<h1>js代码</h1>
<pre class="brush:php;toolbar:false;">
/* 二维数组按照指定字段进行排序
* @params array $array 需要排序的数组
* @params string $field 排序的字段
*/
function arraySequence($array, $field, $sort = 'SORT_DESC') {
$arrSort = array();
foreach ($array (___1___) $uniqid => $row) {
foreach ($row (___2___) $key => $value) {
$arrSort[$key][$uniqid] = $value;
}
}
if(count($arrSort)<=10){
return;
}
array\_multisort($arrSort[$field], constant($sort),$array); (___100___) $array;}
</pre>`;
问题描述
想匹配出多个pre标签之间的内容,但str里的内容太过复杂,基本包含了所有字符,正则写了好久没写出来,求助大神