#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)\d+(\.\d+)?([Ee]\D+)?"
Local $sString = "This is just a test" & @CRLF & _
"where we can have multiple email addresses" & @CRLF & _
"which can be gil@home.com" & @CRLF & _
"g.echeverria@tec.mx" & @CRLF & _
"gil2@one.long.domain.org" & @CRLF & _
"Or something more elaborate" & @CRLF & _
"one1.two2-three3@is.this-site.real.net" & @CRLF & _
"brave_world@survive.com.it" & @CRLF & _
"And just like that there can me more formats for emails" & @CRLF & _
"But how can we extract those" & @CRLF & _
"34.76e4" & @CRLF & _
"875" & @CRLF & _
"34.43.34.676"
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