#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?<AttributeName>(?:src|background))\s*=\s*["'](?<AttributeValue>(?:[^"'])*)"
Local $sString = "<html>" & @CRLF & _
"<table id='tblTest' border="1">" & @CRLF & _
"<tr>" & @CRLF & _
"<td colspan="1" >CellA</td>" & @CRLF & _
"</tr>" & @CRLF & _
"<tr>" & @CRLF & _
"<td>Click<a href="http://mail.google.com" >here</a></td>" & @CRLF & _
"</tr>" & @CRLF & _
"<tr>" & @CRLF & _
"<td>" & @CRLF & _
"<img src="http://wcrustine.org/Portals/0/click_here_button.jpg" style="width:100px;height:100px;"></img></td>" & @CRLF & _
"</tr>" & @CRLF & _
"<tr>" & @CRLF & _
"<td background="https://ci6.googleuser.com/proxy/d-NpaBfbly5hKSic8pomfvI4scwJqkF2wwmRqEB4stR8jfO7jo-Sx-JcVLfIXqw5gJnd05Rl0aY3evT2DhmS6he85ifLGQA=s0-d-e1-ft#http://newsletter.mydomain.com/template/header_bg.jpg" bgcolor="#336699" height="100" style="background:url(https://ci5.googleuser.com/proxy/d-NpaBfbly5hKSic8pomfvI4scwJqkF2wwmRqEB4stR8jJrvfO7jo-Sx-JcVLfIgJnd05Rl0aY3evT2DhmS6LU85ifLGQA=s0-d-e1-ft#http://newsletter.mydomain.com/template/header_bg.jpg) top left repeat #336699" width="">" & @CRLF & _
" " & @CRLF & _
"</td>" & @CRLF & _
"</tr>" & @CRLF & _
"</table>" & @CRLF & _
"</html>"
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