$re = '/\??(
((action_)((object)|(type)|(ref))(_map))|
(spm)|(scm(\-|_)(.*?))|(aff_)(.*?)|(algo_)(.*?)|(btsid)|(ws_)(.*?)|
(pd_rd_)(.*?)|(_encoding)|(psc)|(tag)|(ref_)|(pf)|(pf_rd_)(.*?)|
(callback)|
(cvid)|(form)|(sk)|(sp)|(qs)|(pq)|
(mkt_tok)|
(trk(Campaign)?)|
(ga_)(.*?)|(gclid)|(gclsrc)|
(hmb_)((campaign)|(medium)|(source))|
((sp)((Report)|(Job)|(User)|(Mailing))(ID))|
(itm_)(.*?)|
(s_cid)|
(elq((Track)?Id)?)|(elqTrack)|(assetType)|(assetId)|(recipientId)|(ŃampaignId)|(siteId)|
(mc_(c|e)id)|
(pk_)(.*?)|
(sc_)(.*?)|
(utm_)(.*?)|(nr_email_referer)|
(vero_(.*?))|
(nr_)(.*?)|
(yclid)|(_openstat)|(lr)|(redircnt)|
(mbid)|(cmpid)|(cid)|(c_id)|(campaign_id)|(Campaign)|
(fb_)(.*?)|(fbclid)|(f?ref)|(refsrc)|(hrc)|
(gw?s_)(.*?)|(ved)|(s?ei)|
(_hsenc)|(_hsmi)|(__hssc)|(__hstc)|(hsCtaTracking)|
(source)|(position)|
(tt_)(.*?)|
(wt_)(.*?)|
(hc)|(fb)|(yc)|(fan)|(asb)|(asb2)|(mindbox)|(from)|(sh)|(keywords?)|(feature)|(mlid)|(stid)|(topnews_)(.*?)|(persistent_)(.*?)|(msid)|(rubric)|(lang)|(t?t=)(.*?)|(d)|(s)|(psf)|(sourceType)|(short)|(pdp_ext_f)|(utparam)|(pvid))(=(.*?)|(?=(&|$|\r|\n|")))(?=(&|$|\r|"|\n))/';
$str = 'https://yandex.ru/news/story/Prezident_Tokaev_prinyal_otstavku_pravitelstva_Kazakhstana--243e04d37f1419500c9ece814c1d9e30?lang=ru&rubric=index&fan=1&stid=byyvfKwXr5iSKBBZZOVN&t=1641352850&tt=true&persistent_id=176465644&
https://www.aliexpress.com/item/4000317035065.html?pdp_ext_f=%7B%22ship_from%22%3A%22CN%22%2C%22sku_id%22%3A%2212000018551624449%22%7D&sourceType=fd&scm_id=1007.28480.226530.0&scm-url=1007.28480.226530.0&pvid=4ae1761c-d2f8-43f3-a91d-68763fb50e0b&utparam=%257B%2522process_id%2522%253A%2522110%2522%252C%2522x_object_type%2522%253A%2522product%2522%252C%2522pvid%2522%253A%25224ae1761c-d2f8-43f3-a91d-68763fb50e0b%2522%252C%2522belongs%2522%253A%255B%257B%2522id%2522%253A%25224001%2522%252C%2522type%2522%253A%2522dataset%2522%257D%255D%252C%2522scm%2522%253A%25221007.28480.226530.0%2522%252C%2522tpp_buckets%2522%253A%252221669%25230%2523186385%25230_21669%25234190%252319163%2523569_15324%25230%2523132599%25230%2522%252C%2522x_object_id%2522%253A%25224000317035065%2522%257D';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
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 PHP, please visit: http://php.net/manual/en/ref.pcre.php