#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)http[s]?:\/(?:\/[^\/]+){1,}(?:\/[А-Яа-яёЁ\w ]+\.[a-z]{3,5}(?![\/]|[\wА-Яа-яёЁ]))"
Local $sString = "https://i.imgur.com/pO5SM73.png" & @CRLF & _
"https://i.imgur.com" & @CRLF & _
"https://i.imgur.ru/a.gdb" & @CRLF & _
"http://bse.sci-lib.com/article089432.html" & @CRLF & _
"http://megabook.ru/article/Кошка Собака.png" & @CRLF & _
"http://architect.academic.ru/3502/Мансарда" & @CRLF & _
"http://megabook.ru/article/%D0%90%D0%BD%D1%82%D0%B0%D0%B1%D0%BB%D0%B5%D0%BC%D0%B5%D0%BD%D1%82" & @CRLF & _
"http://bse.sci-lib.com/a_pictures/17/10/265722250.jpg" & @CRLF & _
"http://dic.academic.ru/dic.nsf/stroitel/4" & @CRLF & _
"<brbrbr> okk http://fooo-bar.com/more/than/file.exe fdfdfs http://fooo-bar.com/more/than/fil2.exe" & @CRLF & _
"http://a.org/ddddd.ddddd" & @CRLF & _
"http://a.org/ddddd.dddddв"
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