#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m).*itemprop="(name|acceptedAnswer|suggestedAnswer)".*"
Local $sString = "<div itemscope itemtype="http://schema.org/Question">" & @CRLF & _
"<h1 itemprop="name">Какое геометрическое тело получается вращением круга вокруг своего диаметра?</h1>" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"<h2>Варианты ответа:</h2>" & @CRLF & _
"<div class="variants">" & @CRLF & _
"<div itemprop="acceptedAnswer" itemscope itemtype="http://schema.org/Answer" class="one-fourth correct"><span itemprop="text">шар</span></div>" & @CRLF & _
"<div itemprop="suggestedAnswer" itemscope itemtype="http://schema.org/Answer" class="one-fourth"><span itemprop="text">цилиндр</span></div>" & @CRLF & _
"<div itemprop="suggestedAnswer" itemscope itemtype="http://schema.org/Answer" class="one-fourth"><span itemprop="text">конус</span></div>" & @CRLF & _
"<div itemprop="suggestedAnswer" itemscope itemtype="http://schema.org/Answer" class="one-fourth"><span itemprop="text">пирамида</span></div>" & @CRLF & _
"</div>" & @CRLF & _
"</div>" & @CRLF & _
""
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