2017-04-11 70 views
1

在代碼如何使的preg_match與後退符號

<td><span class="user "><i class="arrived" title="Провинциалист"></i><a href="/player/154646/">-Ваня-</a><span class="level">[5]</span></span></td> 
<td class="value"></td> 
<td><span class="user "><i class="arrived" title="Провинциалист"></i><a href="/player/174078/">asen</a><span class="level">[6]</span></span></td> 
<td class="value"></td> 
<td><span class="user "><i class="arrived" title="Провинциалист"></i><a href="/player/198745/">jsan</a><span class="level">[7]</span></span></td> 
<td class="value"></td> 
<td><span class="user "><i class="arrived" title="Провинциалист"></i><a href="/player/1698735/">aseto</a><span class="level">[8]</span></span></td> 
<td class="value"></td>` 

我怎樣才能做到和1-ST上做「電平」 preg_match> [」和如果該號碼是> = 6和< 8然後在此數字之前做同一行上的preg_match,例如第一個preg_match級別>> [6],並看到它等於,然後在播放機上製作preg_match並且看到該數字是「174078」

+0

在文檔中加載並使用xpath - '// span [@ class =「level」] [number((translate(。,「] [」,「」)) )> = 6和數字((translate(。,「] [」,「」)))<8] /../ a/@ href' – splash58

回答