#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?isx)<img\s[^>]*src="(?<imageURL>[^"]*)"\s*\/> # IMG tag" & @CRLF & _
".*? # Anything in-between IMG and A" & @CRLF & _
"<a\s[^>]*?href="\/title\/tt" & @CRLF & _
" (?<imdbid>\d{7}) # Got the imdbid" & @CRLF & _
" \/[^>]*>(?<title>.*?) # Got title" & @CRLF & _
" <\/a> # End of A tag" & @CRLF & _
" \s*\(" & @CRLF & _
" (?<year>\d{4}) # Year" & @CRLF & _
" \)\s*(?:\( # Type is optional " & @CRLF & _
" (?<type>[^<]*) # Type" & @CRLF & _
" \))? # End of optional group"
Local $sString = "<tr class="findResult odd">" & @CRLF & _
" <td class="primary_photo"><a href="/title/tt0499549/?ref_=fn_tt_tt_1" ><img src="http://ia.media-imdb.com/images/M/MV5BMTYwOTEwNjAzMl5BMl5BanBnXkFtZTcwODc5MTUwMw@@._V1_SX32_CR0,0,32,44_AL_.jpg" /></a></td>" & @CRLF & _
" <td class="result_text"><a href="/title/tt0499549/?ref_=fn_tt_tt_1" >Avatar</a> (2009) </td>" & @CRLF & _
" </tr>" & @CRLF & _
" <tr class="findResult even">" & @CRLF & _
" <td class="primary_photo"><a href="/title/tt0417299/?ref_=fn_tt_tt_2" ><img src="http://ia.media-imdb.com/images/M/MV5BMTM3MTc3OTc0NF5BMl5BanBnXkFtZTcwOTQ0OTM1MQ@@._V1._CR34,0,295,440_SX32_CR0,0,32,44_AL_.jpg" /></a></td>" & @CRLF & _
" <td class="result_text"><a href="/title/tt0417299/?ref_=fn_tt_tt_2" >Avatar: The Last Airbender</a> (2005) (TV Series) </td>" & @CRLF & _
" </tr>"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm