#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?x)(?J)https?://(?:[a-z0-9]+\.)?livestream\.com/" & @CRLF & _
"(?:" & @CRLF & _
" (?<id>accounts/[0-9]+/events/[0-9]+(?:/videos/[0-9]+)?)" & @CRLF & _
" |" & @CRLF & _
" [^\s/]+/video\?clipId=(?<id>[^\s&]+)" & @CRLF & _
" |" & @CRLF & _
" (?<id>[^\s/]+)" & @CRLF & _
")"
Local $sString = "http://original.livestream.com/bethanychurchnh = bethanychurchnh" & @CRLF & _
"" & @CRLF & _
"http://original.livestream.com/bethanychurchnh/video?clipId=flv_b54a694b-043c-4886-9f35-03c8008c23 = flv_b54a694b-043c-4886-9f35-03c8008c23" & @CRLF & _
"" & @CRLF & _
"http://livestream.com/accounts/142499/events/3959775 = accounts/142499/events/3959775" & @CRLF & _
"" & @CRLF & _
"http://livestream.com/accounts/142499/events/3959775/videos/83958146 = /accounts/142499/events/3959775/videos/83958146"
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