#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?im)((http|https):(\/\/)|www\.)\w*\.*\-*[^(mysite.com)(theothermysite.net)]\w*\.?[^\s\t\r\n\"]*"
Local $sString = "www.demo.com" & @CRLF & _
"// End -->" & @CRLF & _
"http://www.foo.co.uk/ " & @CRLF & _
"http://regexr.com/foo.html?q=bar " & @CRLF & _
""https://mediatemple.net" " & @CRLF & _
"HTTP://mediatemple.net " & @CRLF & _
"<SOURCE src="https://12-lvdl.vimeo.com/01/1087/5/130436788/397857524.mp4?expires=1449922638&token=07929326b8cd27cd962f3" type="video/mp4">" & @CRLF & _
"" & @CRLF & _
"href="http://www.testsite.net/dashboard/editor/uploads/image_uploads/2012/12/12/p6fdVfdfQv0CEhfTf8FHd3A7sNmXigy1K.jpg" width="100%">" & @CRLF & _
"href="http://mysite.com/mailer/themes/Theme1/img/IMG_0001"" & @CRLF & _
"href="http://theothermysite.net/mailer/themes/Theme1/img/IMG_0001"" & @CRLF & _
"www.theothermysite.net/mailer/themes/Theme1/img/IMG_0001"
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