Hello there,
How can I get the following order number with regex?
Invoice Note
257165 Invoice of order number
Written Total Amount: Seven Hundred and Twenty Euro
Hello there,
How can I get the following order number with regex?
Invoice Note
257165 Invoice of order number
Written Total Amount: Seven Hundred and Twenty Euro
Hey @d.ulutas
Here is a solution but not with regex,
str_InvoiceRawText.Split(Environment.Newline.ToCharArray).Where(Function(obj) obj.EndsWith("Invoice of order number")).First().Split(" ".ToCharArray).First().Trim
Hope this helps.
Thanks
#nK
Hey @d.ulutas
Also a solution with Regex,
\d{6}(?= Invoice of order number)
Hope that helps.
Thanks
#nK
no it doesn’t work?
Hey @d.ulutas
Actually working for me,
Can you post that full text here to check. I’m using Regex101.com
Thanks
#nK
Hi,
Can you try the following pattern?
\d+(?=\sInvoice of order number)
OR
\d+(?=\s*Invoice of order number)
Please use .NET(C#) flavor.
Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.