#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "((?<=\/|=)wall|photo|video)(-?[0-9]*)_([0-9]*)(\?reply=)?((?<=reply=)[0-9]*)?"
Local $sString = "vk.com" & @CRLF & _
"https://vk.com/wall-67185996_74433" & @CRLF & _
"https://vk.com/video?z=video-175923038_456239401%2Fpl_cat_trends" & @CRLF & _
"https://vk.com/okoneshdmitriy?z=photo362009308_457249223%2Fwall362009308_754" & @CRLF & _
"https://vk.com/wall362009308_716" & @CRLF & _
"https://vk.com/wall-154906069_1311481?reply=1311486" & @CRLF & _
"https://vk.com/okoneshdmitriy?z=photo362009308_457248991%2Fphotos362009308" & @CRLF & _
"https://vk.com/wall362009308_742?reply=743"
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