我要匹配一段内容要得到这一段内容必须要 用 或者 连接2个匹配前的字符串。但是我不知道怎么联
<th class="left">股市名称</th>
<th>最新</th>
<th>涨跌幅%</th>
td class='left' width='72'>
<div>纳斯达克</div></td>
上面是内容,
现在我要得到
股市名称 最新 涨跌幅% 纳斯达克我写了一个正责:
preg_match_all('/<td[^>]*>|<td>(.*)<\/td>/isU', $value,$strs);但是不能用。
还请看一看。
<th class="left">股市名称</th>
<th>最新</th>
<th>涨跌幅%</th>
td class='left' width='72'>
<div>纳斯达克</div></td>
上面是内容,
现在我要得到
股市名称 最新 涨跌幅% 纳斯达克我写了一个正责:
preg_match_all('/<td[^>]*>|<td>(.*)<\/td>/isU', $value,$strs);但是不能用。
还请看一看。
<th class="left">股市名称</th>
<th>最新</th>
<th>涨跌幅%</th>
<td class='left' width='72'>
<div>纳斯达克</div></td>
html;
preg_match_all('/(<th[^>]*>|<div>)(.*)(<\/th>|<\/div>)/isU', $value,$strs);
print_r($strs[2]);