#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?<partnumber>\d{4}\.\d{3}\.\d{3})\s+(\d+)\s+(\d+)\s+(\d+\,\d+)\s+(\d+)\s+(\d+\,\d+)\s+(.*?)\sHS\.code: (\d+) Country of origin: ([A-Z\/]+)"
Local $sString = "11 4149.310.025 000 1 37,78 1 37,78" & @CRLF & _
"PISTON" & @CRLF & _
"HS.code: 87084099 Country of origin: EU/DE" & @CRLF & _
"EAN: 2050000141478" & @CRLF & _
"21 0734.401.251 000 4 3,05 1 12,20" & @CRLF & _
"PISTON RING" & @CRLF & _
"HS.code: 73182100 Country of origin: JP" & @CRLF & _
"EAN: 2050000026638""
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