Regex Based Information Extraction

Hi Team,

Using Read PDF text i am extracting data froma PDF and pasting it into a Text File.

It has some Amount infomation which is getting Extracted as


I want to get this amount I have used the following Expression but it isn’t working :

System.Text.RegularExpressions.Regex.Matches(Txt, “(?<=\sTotal\s*₹ )\d+(,|.)\d+(,|.)\d+”)(0).ToString

Can anybody Help me Rectify This ?

The Original Text File :
1.txt (647 Bytes)

I need to extract the value which is exactly below the Total Column like in the picture I have mentioned

Hi @Ishan_Shelke

System.Text.RegularExpressions.Regex.Match(Txt,"?<=Services- VD Subsidy(\s).*[\d].\d+\s)\d+\,?\d+\,?\d+\.?\d+").Value

Hope it helps!!


You can try this,

This expression should return the total amount as a string.

System.Text.RegularExpressions.Regex.Matches(Txt, “(?<=\sTotal\s*₹ )\d+(,|.)\d+(,|.)\d+”)(0).Value

HI @Ishan_Shelke

you can try this way both match and matches in regex

  1. Match

  1. with matches you can cal with index


Hi @Parvathy ,


I am getting the following Error While Running

Hi @Ishan_Shelke

Make sure you can given the syntax correctly.


Hi @Ishan_Shelke

you can try this Regex Expression



output :-

1 Like

Hi @Ishan_Shelke

Use this in Assign Activity
Save to: Output
Value to Save: System.Text.RegularExpressions.Regex.Match(Txt,"?<=Services- VD Subsidy(\s).*[\d].\d+\s)\d+\,?\d+\,?\d+\.?\d+").Value

Output variable is of DataType is System.String

Hope it helps!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.