Extract pancard details

Hi ,
I’m trying to extract name ,DOB and pan number from pancard using uipath
extracting DOB is done using regex and pan number is also extracted.

for name i.e RAHUL GUPTA i’m not able to extract the details since there is no label the output stored is as below

"ocr text • INCOMETÅX DEPARTMENT RAHUL GUPTA SURESH GUPTA 23/11/1974 Permanent Account Number ABCDE1234F Signature GOVT. OF INDIA SAMPLE - IMMIHELP.COM

yah once after getting this output string we can use string manipulation to get the values we need
Did we try that like using split method or regex method
@Krutika_Kotkar

so here i tried performing string maniuplation and regex as well
but since the string is
ocr text • INCOMETÅX DEPARTMENT RAHUL GUPTA SURESH GUPTA 23/11/1974 Permanent Account Number ABCDE1234F Signature GOVT. OF INDIA SAMPLE - IMMIHELP.COM

so extracting only rahul gupta is difficult tried to split using \n too

1 Like

if the above string is in a variable named str_input

then Use these expressions to get the particular value
str_name = System.Text.RegularExpressions.Regex.Match(str_input,"(?<=INCOMETÅX DEPARTMENT).*(?=[\s][0-9])").ToString

and for date
str_date = System.Text.RegularExpressions.Regex.Match(str_input,"[0-9]{2}\W+[0-9]{2}\W+[0-9]{4}\W").ToString

and for pan number
str_pan = System.Text.RegularExpressions.Regex.Match(str_input,"(?<=Permanent Account Number).+(?=Signature)").ToString

Cheers @Krutika_Kotkar

If use Is match, matches activity do we need to use Exactly? or at least one for this