#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)^.*?(?<digits>\d{2}-\d{2}|\d{2,4}).*?$"
Local $sString = "ML 12+ (W166) = 12" & @CRLF & _
"FREELANDER II 07+ = 07" & @CRLF & _
"Kuga 08-12 = 08-12" & @CRLF & _
"CRV 2012+ = 2012" & @CRLF & _
"RX270/350 10+ = 10" & @CRLF & _
"QASHQAI 2+ = " & @CRLF & _
"TRIBECA 05 = 05 " & @CRLF & _
"XC60 ="
Local $sSubst = "\1"
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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