#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^((http|https):\/\/)?(www.)?(?!.*(http|https|www.))[a-zA-Z0-9_-]+(\.[a-zA-Z]+)+(\/)?.([\w\?[a-zA-Z-_%\/@?]+)*([^\/\w\?[a-zA-Z0-9_-]+=\w+(&[a-zA-Z0-9_]+=\w+)*)?$"
Local $sString = "httpsa://localhost/pwa/deals" & @CRLF & _
"https://localhost/pwa/deals" & @CRLF & _
"https://localhost/pwa/deals" & @CRLF & _
"https://localhost/pwa/deals/api/sdsdsd" & @CRLF & _
"fb.com/animesh" & @CRLF & _
"sleeptight.com" & @CRLF & _
"multitasking.com" & @CRLF & _
"a2.com" & @CRLF & _
"asdasdasd.com" & @CRLF & _
"sdsdc" & @CRLF & _
"check abunes.com/" & @CRLF & _
"#.in" & @CRLF & _
"google@http://asd.com" & @CRLF & _
"animes@google.com" & @CRLF & _
"test@test.com" & @CRLF & _
"--2-" & @CRLF & _
"www.com" & @CRLF & _
"http://www.computer.com.au/" & @CRLF & _
"f4.animesh@google.com" & @CRLF & _
"https://animeshsingh.in" & @CRLF & _
"http://animeshsingh.in/" & @CRLF & _
"someone.ag" & @CRLF & _
"someone.br/ads" & @CRLF & _
"www.test-my-skills.gov.cz/0999asd-xzc88?0-_/sad%20123/@asdas" & @CRLF & _
"Http://www.@test.com" & @CRLF & _
"Https://www.@test.com" & @CRLF & _
"https://asa .aasd.com" & @CRLF & _
"test@asda.test.cas" & @CRLF & _
"someone.com" & @CRLF & _
"asdasd.com/asdasd/asdasd/asdasd/@asasd" & @CRLF & _
"ftp://siva:asdas@sadasd/asd" & @CRLF & _
"adc" & @CRLF & _
"2@https://www.go.com" & @CRLF & _
"www.google.com" & @CRLF & _
"https://www.somehow.com/@aasd" & @CRLF & _
"https://www.test.facebook.com/@sdas" & @CRLF & _
"Https://www.test.com/@masdasd" & @CRLF & _
"www.instagram.com/f4animesh" & @CRLF & _
"http://www.animeshsingh.in" & @CRLF & _
"www.ASD.com"
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