#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(.*Device:\s*(.*?)\s*Serial Number.*)|(.*Gerät:\s*(.*?)\s*Seriennummer.*)|(.*ICD-Model:\s*(.*?)\s*Serial Number:.*)|(.*ICD-Modell:\s*(.*?)\s*Seriennummer.*)|(.*Pacemaker Model:\s*(.*?)\s*Serial Number.*)|(.*Schrittmachermodell:\s*(.*?)\s*Seriennummer:.*)"
Local $sString = "Device:REVEAL LINQ LNQ11 Serial Number:RLA087267G Date of Visit:03-Jul-2019 08:10:51 " & @CRLF & _
"Gerät:Viva Quad XT CRT-D DTBA2QQ Seriennummer:BLG613658S Untersuchungsdatum:27-Apr-2018 12:34:06 " & @CRLF & _
"ICD-Modell: Marquis VR 7230 Seriennummer: PKD616419S Untersuchungsdatum:12, Mai 2015 " & @CRLF & _
"ICD-Model: Marquis VR 7230 Serial Number: PKD616419S Untersuchungsdatum:12, Mai 2015 " & @CRLF & _
"Pacemaker Model: Medtronic Adapta ADSR01 Serial Number: NWM851790 Date of Visit: 12/08/17 " & @CRLF & _
"Schrittmachermodell: Medtronic Adapta ADVDD01 Seriennummer: NWG618042 Nachsorgedatum: 05.12.1"
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