#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(<ComponentSearchFormField(?:[^<]*?))(\s+)type="inputSearch"((?:[^>]*?)\/>)"
Local $sString = "" & @CRLF & _
" <div className="ui celled grid">" & @CRLF & _
" <div className="row">" & @CRLF & _
" <ComponentSearchFormField" & @CRLF & _
" columnWidth="8"" & @CRLF & _
" type="inputSearch"" & @CRLF & _
" model={depositPrototype}" & @CRLF & _
" field="company"" & @CRLF & _
" sourceCollection={Companies}" & @CRLF & _
" baseCriteria={{isActive: true}}" & @CRLF & _
" />" & @CRLF & _
" <ComponentSearchFormField" & @CRLF & _
" disableValidation" & @CRLF & _
" type="inputSearch"" & @CRLF & _
" model={depositPrototype}" & @CRLF & _
" disableValidation" & @CRLF & _
" title="Currency Code"" & @CRLF & _
" sourceCollection={CurrencyCodes}" & @CRLF & _
" baseCriteria={{isActive: true}}" & @CRLF & _
" />"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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