做题.#include <Array.au3>
Local $sText = _
'<!--<td align="center" style="height:24;font-size:14px">新课程课堂教学行为创新—初中数学</td>-->' & @CRLF & _
' <td class="admintd"><a href=' & "'# ' onclick=" & '"OpenBook(9)" >新课程课堂教学行为创新—初中数学</a></td>' & @CRLF & _
' <td class="admintd">0 小时 0 分钟 </td>' & @CRLF & _
' <td class="admintd">初中数学</td>' & @CRLF & _
' <td class="admintd"><a onclick="return confirm(' & "'是否确定删除该课程?');" & '" id="StudentBookShelflist_ctl01_Linkbutton1" href="javascript:__doPostBack(' & "'StudentBookShelflist$ctl01$Linkbutton1','')" & '">删除</a></td>' & @CRLF & _
' </tr>' & @CRLF & _
' ' & @CRLF & _
' <tr align="center">' & @CRLF & _
' <!--<td align="center" style="height:24;font-size:14px">初中数学新课程典型课案例与点评</td>-->' & @CRLF & _
' <td class="admintd"><a href=' & "'# ' onclick=" & '"OpenBook(10)" >初中数学新课程典型课案例与点评</a></td>' & @CRLF & _
' <td class="admintd">0 小时 0 分钟 </td>' & @CRLF & _
' <td class="admintd">初中数学</td>'
Local $asResult = StringRegExp($sText, '((?s)\((\d+)\)"\s*>(.*?)<.*?"admintd">(.*?)<)', 3)
If Not @Error Then
Local $iCount, $sTip, $iStep
$iCount = UBound($asResult)/4
$sTip = "匹配 " & $iCount & " 个结果"
_ArrayDisplay($asResult, $sTip)
For $i = 1 To $iCount Step 1
$iStep = 4*($i-1)+1
$sTip &= @CRLF & $asResult[$iStep] &@TAB& $asResult[$iStep+1] &@TAB&@TAB& $asResult[$iStep+2]
Next
MsgBox(0, "匹配结果", $sTip)
EndIf
Exit
|