How to search a specific keyword in pdf

Hii,

I have read pdf . I have a keyword “Department number:” keyword and i want to search this value in pdf.

Please help how should i search it and what is the syntax of it

Can you share the pdf?

No its confidential

@Doonline

You can write a If condition as below

YouPDFOutputVariable.contains(“Department number:”)

Then-> Use Regex to get the Department number as below
(?<=Department Number:).+

image

Hope this may help you

Thanks

Hi @Doonline ,

Give a try on the below Expression :

System.Text.RegularExpressions.Regex.Match(pdfText,"(?<=Department number:).*",System.Text.RegularExpressions.RegexOptions.IgnoreCase).Value.ToString