#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(https?://(?![^\s\/]+youtu)[^\s\)\]?]+)\?([^\s\)\]?]{20,})"
Local $sString = "https://www.aliexpress.com/item/4000050337687.html?spm=a2g0o.productlist.0.0.70c9492bADfZA5&algo_pvid=66a91537-1872-4a3b-ab39-e9d130970423&algo_exp_id=66a91537-1872-4a3b-ab39-e9d130970423-0&pdp_ext_f=%7B%22sku_id%22%3A%2210000003069527876%22%7D&pdp_npi=2%40dis%21EUR%2118.03%2114.07%21%21%21%21%21%402100bdd816603176696127137ebeac%2110000003069527876%21sea&curPageLogUid=8f5jqvWtAYMa"
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