Ahh sorry sir @Yoichi and sir @supermanPunch for the confusion , just disregard the linq and data table part.
I think I just need the regex on each captured value.
These are the two strings:
GTB: 123456| fee_amount: 165.0 | QR
GTB: 1234567| fee_amount: 13.0 | NON-QR
How to extract the numbers after GTB? and the fee amount? and if it is QR or NON-QR?
I will assign the number after GTB as “InvoiceNumber” variable
I will assign the fee amount as “Fee” variable
I will assign the QR or NON-QR as “Scan” variable
Expected output on first string:
InvoiceNumber = “123456”
Fee = “165.0”
Scan = “QR”
Expected output on second string:
InvoiceNumber = “1234567”
Fee = “13.0”
Scan = “NON-QR”
The regex should be the same on the two expected output.
Thank you sir @supermanPunch , I was able to use it inside the LINQ too!
This is sample process I’m expecting Sample Test.zip (2.9 KB)
Let details = a("details").ToString
Let InvNo = Regex.Match(details,"(?<=GTB:).*?(?=\|)").value.Trim
Let Fee = Regex.Match(details,"(?<=fee_amount:).*?(?=\|)").value.Trim
Let targetmode = Regex.Match(details,"(?<=fee_amount:.*\|).*").value.Trim
I appreciate the solution you presented sir @Yoichi !