#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "magnet:\?((&?xt\.?\d*=urn:[A-Za-z0-9][A-Za-z0-9-]{0,31}:[A-Fa-f0-9]{20,50})|(&?(dn|tr|xl|ws|as|xs|kt|mt)=[A-Za-z0-9\-._%+;=:?\/]+)&?)+$"
Local $sString = "magnet:?xt=urn:btih:6B5FFA38E0C811E0738697BEC13DDDA57A60FCB4&dn=Taboo.UK.Season.1.S01.1080p.AMZN.WEBRip.5.1.HEVC.x265-GIRAYS&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2F9.rarbg.to%3A2920%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&as=udp%3A%2F%2Ftracker.internetwarriors.net%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969%2Fannounc/e&tr=udp%3A%2F%2Ftracker.pirateparty.gr%3A6969%2Fannounce&tr=udp%3/A%2F%2Ftracker.cyberia.is%3A6969%2Fannounce&xt=urn:btih:6B5FFA38E0C811E0738697BEC13DDDA57A60FCB4&xt=urn:btih:6B5FFA38E0C811E0738697BEC13DDDA57A60FCB4&xs=dchub://example.org&as=http%3A%2F%2Fdownload.wikimedia.org%2Fmediawiki%2F1.15%2Fmediawiki-1.15.1.tar.gz&xl=10826029&dn=mediawiki-1.15.1.tar.gz"
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