#include <Array.au3>
Local $Str = _
'<tr>' & @CRLF & @CRLF & _
' <td>a1 </td>' & @CRLF & @CRLF & _
' <Td> a1.exe</tD>' & @CRLF & @CRLF & _
' <td>9 </td>' & @CRLF & @CRLF & _
' <td>250 </td>' & @CRLF & @CRLF & _
' <td> 2</td>' & @CRLF & @CRLF & _
' ' & @CRLF & @CRLF & _
' </tr> ' & @CRLF & @CRLF & _
' ' & @CRLF & @CRLF & _
' <tr>' & @CRLF & @CRLF & _
' <td> a2</td>' & @CRLF & @CRLF & _
' <td>a2.exe </td>' & @CRLF & @CRLF & _
' <td>8</td>' & @CRLF & @CRLF & _
' <td>250</td>' & @CRLF & @CRLF & _
' <td>2</td>' & @CRLF & @CRLF & _
' ' & @CRLF & @CRLF & _
' </tr>' & @CRLF & @CRLF
MsgBox(0, '原字符串', $Str)
Local $Test = StringRegExp($str, '(?i)<td>\s*([^<\s]+)', 3)
If Not @Error Then MsgBox(0, '匹配数量: ' & UBound($Test), '其中[0]元素为: ' & $Test[0])
_ArrayDisplay($Test, UBound($Test))
|