Try this: #include <IE.au3> #include <StringConstants.au3> _Example() Func _Example() Local $sTitle = '' Local $oIE = _IEAttach($sTitle) If @error Then Return SetError(@error, @extended, '') ; you solution should start here Local $sHTML = _IEDocReadHTML($oIE) Local $aElement = StringRegExp($sHTML, '(?is)<a href="#".*?class="icon i-close.*?/a>', $STR_REGEXPARRAYGLOBALMATCH) If @error Then Ret