How do i extract the highlighted text using Indexof?
Below is the formula so far i have used:
strInvoiceText.Substring(strInvoiceText.IndexOf(“PAID-UP ,ORDINARY SINGAPORE”)+3869).Split(Environment.NewLine.ToCharArray)(0).Trim
Was trying to extract a specific string of numbers from a PDF file.
Tried 2 different Regex expression below:
system.text.RegularExpressions.Regex.Match(strInvoiceText,“(?<=PAID-UP ,ORDINARY SINGAPORE, DOLLARS\s\s)(.*)\d(?=\s)”).Value
system.text.RegularExpressions.Regex.Match(strInvoiceText,“(?<=PAID-UP ,ORDINARY SINGAPORE, DOLLARS\s\s)(\d.+\d)”).Value).Replace(" “,”")
but somehow UIpath is not able to extract thus resort to using Indexof.
Attaching the PDF file for reference.
1.pdf (136.1 KB)
Appreciate the help in advance!