回复 7# user11
看来一定要代码了
#include <Array.au3>
Local $Str = _
'<div><a class="link_1" href="http://u.xxx.com/123455-1-1.html" target="_blank">昵称1</a> </div>' & @CRLF & _
' <div>会员</div> <div style="color: red;">北京</div> ' & @CRLF & _
' <div class="re_topic"> <span class="float_Right">2011-05-23 23:20</span></div>' & @CRLF & @CRLF & _
' <div><a class="link_1" href="http://u.xxx.com/12234585-1-1.html" target="_blank">昵称12</a> </div>' & @CRLF & _
' <div>会员</div> <div style="color: red;">北京</div> ' & @CRLF & _
' <div class="re_topic"> <span class="float_Right">2011-05-23 23:20</span></div>' & @CRLF & @CRLF & _
' <div><a class="link_1" href="http://u.xxx.com/12134385-1-1.html" target="_blank">昵称123</a> </div>' & @CRLF & _
' <div>会员</div> <div style="color: red;">北京</div> ' & @CRLF & _
' <div class="re_topic"> <span class="float_Right">2011-05-23 23:20</span></div>'
MsgBox(0, '原字符串', $Str)
Local $Test = StringRegExp($str, '[^<>]+(?=\<\/a\>)|<div\ss.*?>(.*)(?=\<\/div)', 3)
If Not @Error Then MsgBox(0, '匹配数量: ' & UBound($Test), '其中[0]元素为: ' & $Test[0])
_ArrayDisplay($Test, UBound($Test))
|