#include <Array.au3>
Local $sSource = _
' <a target="_blank" href="dlt.shtml">超级大乐透</a>' & @CRLF & _
' </td>' & @CRLF & _
' <td align="center">19062期' & @CRLF & _
' </td>' & @CRLF & _
' <td align="center">2019-06-01</td>' & @CRLF & _
' <td class="td_kjhm01">' & @CRLF & _
' <script language="javascript">' & @CRLF & _
" formatResult('dlt','05,16,23,25,28|01,12');" & @CRLF & _
' </script>'
;~ MsgBox(0, '源字符串', $sSource)
Local $aSRE = StringRegExp($sSource, '(?si)"dlt.shtml">(.+?)</a>.+?">(\d+期).+?">([\d-]+)</td>.+?' & "'dlt','([^']+)'\);", 3)
If Not @Error Then MsgBox(0, '匹配数量: ' & UBound($aSRE), '其中[0]元素为: ' & $aSRE[0])
_ArrayDisplay($aSRE, UBound($aSRE))
|