Extract data from pdf using Regex


I am trying to use Regex, however I still did not find the right formula, the text looks like this:


I tried to use:

System.Text.RegularExpressions.Regex.Match(pdfExtract,“((?<=Sub Total )\d+[.]\d+)|((?<=GST \d\d% )\d+[.]\d+|(?<=GST \d% )\d+[.]\d+)|((?<=Total )\d+[.]\d+)”).ToString

But it gives me an empty value.

Do you have some advice? what is the correct formula?

Thank you!

Hi,The data you want is Subtotal GST and Total, right?

Hi, yes…Subtotal, GST and Total from several pdf documents

I hope this text is not in the form of pictures, but words that can be copied and pasted

It should be possible to copy them. At least I used get PDF text as a first step. So now I just need to extract the numbers from it…

can you print the value of pdfExtract and post it here please?

@Tereza_Steflova - If you have the .txt file format of the pdf, could you please share it here?