#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mi)^(?:[a-z][0-9a-z-.+]*:\/\/)?((?:(?:[a-z\u00a1-\uffff0-9_]+-?)*[a-z\u00a1-\uffff0-9_]+)(?:\.(?:[a-z\u00a1-\uffff0-9_]+-?)*[a-z\u00a1-\uffff0-9_]+)*(?:\.(?:[a-z0-9\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/.*)?(?:\?.*)?(?:\#.*)?$"
Local $sString = "socks://www.example.com" & @CRLF & _
"10.1.1.1" & @CRLF & _
"10.1.1.2/4" & @CRLF & _
"10.1.1.3/0" & @CRLF & _
"10.1.1.0/8" & @CRLF & _
"10.1.1.5/32" & @CRLF & _
"10.1.1.6/35" & @CRLF & _
"10.1.1.7/36000" & @CRLF & _
"10.1.1.8/abcd" & @CRLF & _
"10.1.1.9-10.1.1.10" & @CRLF & _
"user:pass@zxuz.com" & @CRLF & _
"user@proxy.brew.opendnstest.com/customBlockUserInfo" & @CRLF & _
"user:@proxy.brew1.opendnstest.com/customBlockUserInfo" & @CRLF & _
"user:password@proxy.brew2.opendnstest.com/customBlockUserInfo" & @CRLF & _
"ftp://cnn.example.com&story=breaking_news@foobar.com/top_story.htm" & @CRLF & _
"foo.com:8080/bar/baz" & @CRLF & _
"asdfasdf.com/foo/b%20ar" & @CRLF & _
"https://example.com/archive/*/http://somesite.com" & @CRLF & _
""
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