#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)https?://(\S+\.)+\S+(/\S+)*/?"
Local $sString = "https://t.co/8OMryrUVET" & @CRLF & _
"https://regex101.com/" & @CRLF & _
"https://www.google.com/search?client=firefox-b-d&q=nltk+string+cleaning" & @CRLF & _
"https://machinelearningmastery.com/clean-text-machine-learning-python/" & @CRLF & _
"" & @CRLF & _
"py New Year from #MarALago! Thank you to my..." & @CRLF & _
"4 Well the year has officially begun. I have man..." & @CRLF & _
"5 I will be going to Mississippi tomorrow night ..." & @CRLF & _
"6 The person that Hillary Clinton least wants to..." & @CRLF & _
"7 Thank you so much to https://t.co/8OMryrUVET f..." & @CRLF & _
"8 #VoteTrump2016 & together we will #MakeAmerica..."
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