#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mx)^(https?:\/\/)? #протокол" & @CRLF & _
"([\w-]{1,32}\.[\w-]{1,32}) #домен" & @CRLF & _
"[^\s@]* #любой не пробельный символ + @" & @CRLF & _
"$" & @CRLF & _
""
Local $sString = "/********************** yes *****************/" & @CRLF & _
"http://yan-dex.ru" & @CRLF & _
"http://asd-asd.ru" & @CRLF & _
"sdf-sdf.ru" & @CRLF & _
"http://sdfsdf.ru/sadasds-sadsad/sadsad" & @CRLF & _
"http://sdfsdf.ru/sadasds-sadsad/sadsad?page=2" & @CRLF & _
"http://sdfsdf.ru/sadasds-sadsad/sadsad?page=2&other=1" & @CRLF & _
"sdfsdf.ru/sadasds-sadsad/sadsad?page=2&other=1" & @CRLF & _
"http://sdfsdf.ru/sadasds/sadsad?page=2&other=1" & @CRLF & _
"https://regex101.com/r/tM7Pmr/1" & @CRLF & _
"http://regexpres.narod.ru/calculator.html" & @CRLF & _
"http://regexpres.narod.ru/calculator.htm" & @CRLF & _
"http://regexpres.narod.ru/calculator.php" & @CRLF & _
"http://regexpres.narod.ru/index.php" & @CRLF & _
"http://regexpres.narod.ru/index" & @CRLF & _
"https://jsfiddle.net/3b0khwhasd6/" & @CRLF & _
"https://lenta.ru/articles/2017/03/06/ruvlogs/" & @CRLF & _
"https://www.youtube.com/watch?v=PDxVcTWVIck" & @CRLF & _
"www.youtube.com/watch?v=PDxVcTWVIck" & @CRLF & _
"" & @CRLF & _
"https://zakon.ru/blog/2017/03/06/delo_o_denezhnyh_generatorah_i_udobnom_sude__p-v_protiv_ikea_opredelenie_skgd_vs_ot_17012017_36-kg16" & @CRLF & _
"https://zakon.ru/konstitucionnyj_sud_rf" & @CRLF & _
"" & @CRLF & _
"zakon.ru/blog/2017/03/06/delo_o_denezhnyh_generatorah_i_udobnom_sude__p-v_protiv_ikea_opredelenie_skgd_vs_ot_17012017_36-kg16" & @CRLF & _
"https://zakon.ru/konstitucionnyj_sud_rf" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"/********************** not *****************/" & @CRLF & _
"4234czxc" & @CRLF & _
"sdfsdf" & @CRLF & _
"sdsad.rturturturt/fsdfsd@sd"
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