#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mi).*сума[:\s]+(?<suma>\d{1,5}[.,]\d{1,2}).*(?<pan>[0-9X\*]{16}).*термі.*(?<terminalId>[A-Z0-9]{8,10}).*код автор.*(?<approvalCode>\d{1,6}).*чек.*(?<chq>\d{1,10}).*rrn[:\s]+(?<rrn>\d{1,12})"
Local $sString = "ПРИВАТБАНК\nМАГАЗИН Xxxxxx\nвул.Кручковського,буд.5Б\nс.Нагачiв\nФОП XXXXX Б.Б.\n2517109510\nОПЛАТА\nСУМА:1.25 ГРН\n\n************4211\nContactless\nMASTERCARDAID: A0000000041010\nТЕРМIНАЛ # S11800CC20 ЛЮТ 2024 18:49:02\nКОД АВТОРИЗ.: 463521ЧЕК N: 436084\nRRN: 080469527205\n\n(с)SSI 2023 PRIVATBANK v.T5PRVa_.04E\nSmartPos_EMV 01.001\n"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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