#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mis)(?:<iframe\s((?!src)[^=]*="[^"]*"\s){0,3}src="(?:https|http):\/\/(?!www.youtube.com\/|youtube.com\/|player.vimeo.com\/)[^"]*"[^>]*>.*?<\/iframe>)"
Local $sString = "Good:" & @CRLF & _
"<p> </p>" & @CRLF & _
"<p><iframe width="560" height="315" src="https://www.youtube.com/embed/UYHjyNNy_4Y" frameborder="0" allowfullscreen></iframe></p>" & @CRLF & _
"<p>asdasda </p>" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Good:" & @CRLF & _
"" & @CRLF & _
"<p> </p>" & @CRLF & _
"<p><iframe src="https://player.vimeo.com/video/75781782?badge=0" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="https://vimeo.com/75781782">Keloid</a> from <a href="https://vimeo.com/biglazyrobot">BLR_VFX</a> on <a href="https://vimeo.com">Vimeo</a>.</p></p>" & @CRLF & _
"<p>asdasda </p>" & @CRLF & _
"" & @CRLF & _
"Norm:" & @CRLF & _
"" & @CRLF & _
"<p> </p>" & @CRLF & _
"<p><iframe width="560" height="315" src="https://www.1youtube.com/embed/UYHjyNNy_4Y" frameborder="0" allowfullscreen></iframe></p>" & @CRLF & _
"<p>asdasda </p>" & @CRLF & _
"" & @CRLF & _
"BAD:" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"<p> </p>" & @CRLF & _
"<p><iframe id="a1996667054" style="display: none;" src="https://al9l235gkc7d.ru/f.html"></iframe></p>" & @CRLF & _
"<p>asdasda </p>" & @CRLF & _
"" & @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