#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)((?:\b(?!\.))(?!.*\.\..*)(?:[a-zA-Z0-9\.\-\+_\-]+?)?[a-zA-Z0-9]+?|\"\s\"|\"[a-zA-Z0-9]+?\.\.[a-zA-z0-9]+?\")@([a-zA-Z0-9]+(?:\-[a-zA-Z0-9])?\.?[a-zA-Z0-9]+(?:\.[a-zA-Z]+)?)"
Local $sString = "ss.s.s+eee-eee_eeee@gmail.com é o meu email. " & @CRLF & _
"O e-mail a@a1-m.com.br também pertence @ mim.com.br!!!@cc.com " & @CRLF & _
"" & @CRLF & _
"example@s.example" & @CRLF & _
"simple@example.com" & @CRLF & _
"very.common@example.com" & @CRLF & _
"disposable.style.email.with+symbol@example.com" & @CRLF & _
"other.email-with-hyphen@example.com" & @CRLF & _
"fully-qualified-domain@example.com" & @CRLF & _
"user.name+tag+sorting@example.com" & @CRLF & _
"example-indeed@strange-example.com" & @CRLF & _
"admin@mailserver1" & @CRLF & _
"" "@example.org" & @CRLF & _
""john..doe"@example.org" & @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