#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?:'|")([^"':]*?\.(?:png|jpe?g|gif)[^'"]*(?=[^<]+?>))"
Local $sString = "TO MATCH:" & @CRLF & _
"<img src="images/vendor.png" alt="" > <img src="images/vendor.gif" class="box-bg-image" alt="" >" & @CRLF & _
"<img src="images/vendor-dp-20141009-flatware.jpg" class="box-bg-image" alt="" >" & @CRLF & _
"<img src="images/vendor-flatware.jpeg" class="box" alt="" >" & @CRLF & _
"<img src='images/vendor-flatware.jpeg' class="box" >" & @CRLF & _
"<img alt="" src= 'images/vendor-flatware.jpeg' alt="" >" & @CRLF & _
"<img src=' images/vendor-flatware.jpg' alt="" >" & @CRLF & _
"<img src=' images/vendor-flatware.gif' alt="" >" & @CRLF & _
"<img src=' images/vendor-flatware.png ' alt="" >" & @CRLF & _
"<img src='../silverware.png' alt="" >" & @CRLF & _
"<img class="box" src='images/vendor-watch.png' alt="" >" & @CRLF & _
"<img src=" images/vendor-flatware.jpeg " alt="" >" & @CRLF & _
"< img src="images/vendor-flatware.jpeg " alt="" >" & @CRLF & _
"< img src="images/vendor-flatware.jpeg " alt="" >" & @CRLF & _
"<img src="vendor.gif" alt="">" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"NOT TO MATCH:" & @CRLF & _
"<img src="http://thirdpartycdn.com/image.jpg">" & @CRLF & _
"<img src='http://thirdpartycdn.com/image.png'>" & @CRLF & _
"<img src="http://thirdpartycdn.com/image.gif" class="box-bg-image" alt="">" & @CRLF & _
"img src="images/vendor-flatware.jpeg "" & @CRLF & _
"<img src="images/vendorpng" alt="" >"
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