Extract data with different Names

My use case : i want to extract Data from different PDF Invoice number data, which having different text like 1st PDF - its name is (Invoice number), 2nd PDF - (Invoice Number), 3rd PDF (Invoice no), 4th PDF having (InvoiceNumber) how to make it as similar. How can i extract Data please give me solution.

Hi @Rakshitha_Ram,

Please find the below useful link.

Second way : You can use to regular expression to get the invoice number or invoice no.

Regards,
Omkar P

1 Like

Hi,

Use can you Regex for these words to find out the required data and collect results in the list or array.

  1. System.Text.RegularExpressions.Regex.Match(strinput.ToString,”(?<=Invoice number).*(\d)”).ToString.Trim
  2. System.Text.RegularExpressions.Regex.Match(strinput.ToString,”(?<=Invoice Number).*(\d)”).ToString.Trim
  3. System.Text.RegularExpressions.Regex.Match(strinput.ToString,”(?<=Invoice no).(\d)”).ToString.Trim
    4)System.Text.RegularExpressions.Regex.Match(strinput.ToString,”(?<=InvoiceNumber).
    (\d)”).ToString.Trim
2 Likes

Hi @Rakshitha_Ram

Can you show us sample data for all 4 types of format of text along with der invoice no values ??

So that exact regex solution we can give you

Just the data you haven’t provided in the query so assuming some dummy data as below and applying the regex which gives the output that you are expecting :-

image

Hope this is what you are looking for and will help you or else this will give you the starter help or else you can provide the SS or data so if this wont work then exact regex we will try to apply on your data

Mark as solution and like it if it helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

2 Likes

I used this syntax in Match Activity. How can i load extracted data to variable.

Hi @Rakshitha_Ram

So you may have used Matches Activity for applying the regex on you data right ??

For this activity you might have gave some variable in the output.
suppose the variable is :- invoiceNoFromRegex

So you have to use this variable in following way to store that value in some variable

strInvoiceNo = invoiceNoFromRegex(0).value

Mark as solution and like it if it helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

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