Input: Client Name\r\nACME Systems Inc.\r\nSomewhere Road 59,\r\nBucharest, Romania\r\nNotes\r\nInvoices must be paid within 20 days starting with the issue date.\r\nInvoice No. 317718 Bulevardul Unirii 11\r\nIasi, Romania\r\nVendor: Mecatronic Group\r\nDate: 2017-08-02\r\nItem Description\r\nConcierge Services\r\nQuantity\r\n1\r\nPrice Per\r\n232328 USD\r\nTotal\r\n232328 USD\r\nSubtotal: 193607 USD\r\nTax: 38721.4 USD\r\nTotal: 232328 USD
Output:
Invoice No. 317718
Date: 2017-08-02
Tax: 38721.4 USD
Subtotal: 193607 USD
@Aravinthan,
Can you please use this logic for your case
invoice No = System.Text.RegularExpressions.Regex.Match(myStringVal,“((?<=Invoice No.:).*)”).Value
Date = System.Text.RegularExpressions.Regex.Match(myStringVal,“((?<=Date.:).)“).Value
Tax = System.Text.RegularExpressions.Regex.Match(myStringVal,”((?<=Tax.:).)”).Value
Subtotal = System.Text.RegularExpressions.Regex.Match(myStringVal,“((?<=Subtotal.:).*)”).Value
Hope this will work. Please let me know if your facing any problem in this logic.
Thanks,
Arunachalam.
1 Like
No bro dint work
Kindly help Pls
@Aravinthan,
Can you please try this logic
subtotal = myString.Substring(myString.IndexOf(“Subtotal:”),myString.Substring(myString.IndexOf(“Subtotal:”)).IndexOf(“\r\n”))
Tax = myString.Substring(myString.IndexOf(“Tax:”),myString.Substring(myString.IndexOf(“Tax:”)).IndexOf(“\r\n”))
Date = myString.Substring(myString.IndexOf(“Date:”),myString.Substring(myString.IndexOf(“Date:”)).IndexOf(“\r\n”))
I have created workflow for your case. Please check and let me know.
RegexText.zip (12.0 KB)
Thanks,
Arunachalam.
1 Like