#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mi)^(@)?(https?:)?(\/\/)?(www\.)?(([a-z0-9\p{L}][a-z0-9\p{L}-\.]{1,61})([a-z0-9\p{L}]\.[a-z0-9\p{L}][a-z\p{L}-])*([a-z0-9\p{L}])+\/)?(#!\/)?([a-z0-9][a-z0-9.]{1,61})([\/|\?].*)*$"
Local $sString = "http://xn--80adtDgbbrh1bc.xn--p1ai/pavel.durov" & @CRLF & _
"" & @CRLF & _
"http://www.twitter.com/codeschool" & @CRLF & _
"" & @CRLF & _
"https://www.twitter.com/dssd" & @CRLF & _
"" & @CRLF & _
"http://www.twitter.com/#!/donttrythis" & @CRLF & _
"" & @CRLF & _
"http://twitter.com/KimKardashian" & @CRLF & _
"" & @CRLF & _
"http://www.twitter.com/#!/KourtneyKardash/following" & @CRLF & _
"" & @CRLF & _
"http://twitter.com/#!/jasonterry31/lists/memberships" & @CRLF & _
"" & @CRLF & _
"https://vk.com/igor.suvorov" & @CRLF & _
"https://tWitter.com/suvorovigor" & @CRLF & _
"https://telegram.me/skillbranch" & @CRLF & _
"@skillbranch" & @CRLF & _
"https://vk.com/skillbranch" & @CRLF & _
"https://vk.com/skillbranch?w=wall-117903599_1076"
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