#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?i)(https?:\/\/)?(w{3}\.)?(\w+\.\w{2,3}\.\w{2}?)?(\w+-)?(:?%?\w{2,}\/?\.\w{2,3})?(\/\w+)?(\/[\d\w].+\s$)?(:\d+)?"
Local $sString = "" & @CRLF & _
"" & @CRLF & _
"https://www.google.co.in/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=trie+data+structure+tutorial+%7C+explanation" & @CRLF & _
"http://vnc.example.com:5800 " & @CRLF & _
"gskinner.com/products/spl" & @CRLF & _
"gskinner.com" & @CRLF & _
"adobe.com/go/flex" & @CRLF & _
"google.in" & @CRLF & _
"http://boswebsvr009:8090/confluence/display/DEV/Training+for+2015+batch+junior+engineers"
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