#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?:\/p\/|$)(?:[^\/]*)(?<=-)(.*)(?=\/)"
Local $sString = "https://www.ikea.com/de/de/p/hallbar-abfalltrennungsloesung-mit-auszug-hellgrau-s09308825/" & @CRLF & _
"" & @CRLF & _
"https://www.ikea.com/de/de/p/symfonisk-regal-wifi-speaker-schwarz-50357554/?tduid=d8b332c221610a36288c647f8959959f&utm_medium=affiliate&utm_name=generic&utm_term=conversion&utm_content=deeplink&utm_source=SmartApfel" & @CRLF & _
"" & @CRLF & _
"https://www.ikea.com/de/de/p/symfonisk-tischleuchte-mit-wifi-speaker-weiss-30435157/?tduid=d8b332c221610a36288c647f8959959f&utm_medium=affiliate&utm_name=generic&utm_term=conversion&utm_content=deeplink&utm_source=SmartApfel" & @CRLF & _
"" & @CRLF & _
"https://www.ikea.com/de/de/p/tradfri-gateway-weiss-40337806/?tduid=d8b332c221610a36288c647f8959959f&utm_content=feed&utm_medium=affiliate&utm_name=generic&utm_source=SmartApfel&utm_term=conversion" & @CRLF & _
"" & @CRLF & _
"https://www.ikea.com/de/de/p/fyrtur-verdunklungsrollo-kabellos-batteriebetrieben-grau-40408196/?tduid=d8b332c221610a36288c647f8959959f&utm_content=feed&utm_medium=affiliate&utm_name=generic&utm_source=SmartApfel&utm_term=conversion" & @CRLF & _
"" & @CRLF & _
"https://www.ikea.com/de/de/p/kadrilj-rollo-kabellos-batteriebetrieben-grau-90408127/?tduid=d8b332c221610a36288c647f8959959f&utm_content=feed&utm_medium=affiliate&utm_name=generic&utm_source=SmartApfel&utm_term=conversion"
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