Hi everyone ![:)]()
I trying for more than a hour to get this regular expression right, what I want to do is grab multiple strings inside a table/div on a webpage the problem is to put this to check multiple times for the expressions to capture between (in the example " and "</table")
In this example I'm trying to get all the topic names listed on first page of "General Help and Support" from Autoit forum's but limiting the search/capture between '<table class="ipb_table topic_list hover_rows " summary="Topics In This Forum "General Help and Support"" id="forum_table">' and '</table>'
(I don't know how to paste this tidy, if some one experienced in the mater can share the secret I'll be grateful
)
EDIT: Code updated, forgot to add 'BinaryToString' to $pg var
![:)](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/smile.png)
I trying for more than a hour to get this regular expression right, what I want to do is grab multiple strings inside a table/div on a webpage the problem is to put this to check multiple times for the expressions to capture between (in the example " and "</table")
In this example I'm trying to get all the topic names listed on first page of "General Help and Support" from Autoit forum's but limiting the search/capture between '<table class="ipb_table topic_list hover_rows " summary="Topics In This Forum "General Help and Support"" id="forum_table">' and '</table>'
(I don't know how to paste this tidy, if some one experienced in the mater can share the secret I'll be grateful
![:)](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/smile.png)
[ autoit ]
#include <Array.au3> $pg = InetRead("http://www.autoitscript.com/forum/forum/2-general-help-and-support/",1) If $pg <> '' Then $exp = '(?i)<table class="ipb_table topic_list hover_rows " summary="Topics In This Forum "General Help and Support"" id="forum_table">.*?'& _ '(?:<a itemprop="url" id=".*?" href=".*?" title="(.*?) - started .*?" class="topic_title">)*?.*?</table>' $aTopics = StringRegExp(BinaryToString($pg),String($exp),3) ConsoleWrite(@error&@LF) _ArrayDisplay($aTopics) Else ConsoleWrite("Cannot DL the page"&@LF) EndIf Exit
EDIT: Code updated, forgot to add 'BinaryToString' to $pg var