#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(.+)(\@)(\w+)(\.)(\w{3,4})$"
Local $sString = "some@email.com" & @CRLF & _
"yo@email.com" & @CRLF & _
"yoo@email.com" & @CRLF & _
"212@yahoo.com" & @CRLF & _
"@yahoo.com" & @CRLF & _
"moreover@." & @CRLF & _
"superb@.com" & @CRLF & _
"yahoo.com@superninja.net" & @CRLF & _
"hmmer.com@" & @CRLF & _
"some@email.body" & @CRLF & _
"superb@new.horizon" & @CRLF & _
"super.man.followme@neworld.wow"
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