按这样的条件,这个还算好提取吧.
(只是个人见解, 希望起抛砖引玉之效!)
#include<array.au3>
Local $str = '<a name=111111></a><a href="read-htm-tid-111111-fpage-1.html" id="a_ajax_111111" class="subject"><font color=#FF0000>xxxxxx</font></a> ' & " <span class='gray tpage'>" & @CRLF & _
'<a name=222222></a><a href="read-htm-tid-222222-fpage-1.html" id="a_ajax_222222" class="subject">yyyyyy</a> ' & " <span class='gray tpage'>" & @CRLF & _
'<a name=333333></a><a href="read-htm-tid-333333-fpage-1.html" id="a_ajax_333333" class="subject">zzzzzz</a> ' & " <span class='gray tpage'>"
MsgBox(0, '', $str)
Local $result = StringRegExp($str, 'name=(\d+).+subject">(?:<font[^>]+>)?([^>]+)<', 3)
_ArrayDisplay($result)
|