#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mi)^(http|https):\/\/"
Local $sString = "https://images.unsplash.com/photo-1441742917377-57f78ee0e582?q=80&fm=jpg&s=a79e8a2beba8b3a1ad251798a9024d8b" & @CRLF & _
"http://stackoverflow.com/questions/10625497/regex-to-check-if-http-or-https-exists-in-the-string" & @CRLF & _
"Http://thepaperwall.com/wallpaper.php?view=4d119619f49377f7aacc7efe564c3bf890b3c063" & @CRLF & _
"hTTp://thepaperwall.com/wallpapers/girls/big/big_4d119619f49377f7aacc7efe564c3bf890b3c063.jpg"
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