Hi UiPath Community ,
I’m working on a project where I need to extract the GST value (like 373714.22) from a PDF invoice using Regex in UiPath. The GST amount appears below the label “3.GST” in the PDF, but my current Regex is not returning any value or give value .
Here’s the Regex I tried:
System.Text.RegularExpressions.Regex.Match(
pdfText,
“3.GST[\s\S]*?(\d{5,8}.\d{2})”,
RegexOptions.IgnoreCase Or RegexOptions.Singleline
).Groups(1).Value how to find and get correct data in pdf
@Mohamad_Musthak
Try Below regex
(?<=3.GST[\s\S*])(\d{5,8}.\d{2})
Or give me exact your input and will prepare regex exact you want.
If you find it helpful, mark it as solution
it print empty string bro
Can you please send your input string
System.Text.regularExpressions.regex.match(yourstring,“(?<=3.GST[\s\S*])(\d{5,8}.\d{2})”).Tostring()
Like this your giving or not? make correct spell mistakes and use
Main.xaml (32.4 KB)
this is my work
new pr.pdf (409.7 KB) i need to extract the data into pdf
output in excel sheet 2
HSN update file 23-26.xlsx (48.6 KB)
@Mohamad_Musthak
There is no Label as 3.GST in your pdf, if it there just send me text after reading the your pdf
Check properly whether that 3.GST label is there or not. if not pass valid label
1 Like
3.GST 373714.22
There is no this kind of data in PDF, please check and ensure what exactly you are trying to extract
sudster
(Sudster)
July 15, 2025, 11:47am
9
Hi @Mohamad_Musthak , looking at the pdf, I don’t think you can reliably extract the GST figures using regex. Please use DU instead.
If you found the solution check post as solution to close this topic
still i am not find the solution
in that PDF can you mark what exact you want to extract
try to locat what exact you want to extract from that pdf
Highlight that field and send the snap here
i find the solution bro
i use read pdf with ocr i got the exact data
1 Like
system
(system)
Closed
July 19, 2025, 6:42am
14
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.