Extract multiple GSTIN number from invoices

While using Receipt and Invoice AI, I even wanted to extract GSTIN or GST number of both the buyer and the seller. How would be I able to do that. Any of regular expression or machine learning extractor work. I wanted to extract multiple values of GSTIN numbers.

1 Like

can i see the sample Data??

\d{2}[A-Za-z]{5}\d{4}[A-Za-z]{1}\d{1}[A-Za-z]{1} this is for GSTIN
use this expression in Matches activity

1 Like

Can this extract multiple Gstin numbers from one particular invoice? Had tried using this.

1 Like

you can do this to see

  • get Matches output like outRegex then pass it to For Each Loop and keep argument type as Object
  • use writeline like this Item.ToString

you can try this

  • Use Load Image activity and pass the image path and the result will be of type Image get output like this outImage

  • Now you can use Microsoft OCR and pass the outImage as input to the Micriosoft OCR this will give you the result of type System.String and get output like outString

  • Now get Matches activity and pass the outString as input to the Matches activity and pass this pattern \d{2}[A-Za-z]{5}\d{4}[A-Za-z]{1}\d{1}[A-Za-z]{1} and output as outGSTIN

  • now if you want to print the output pass outGSTIN to For Each Loop and keep argument type as Object and use WriteLine like this item.ToString

how to use it in regex based extractor?

1 Like

Use matches activity!

Can we extract GST or PAN through ML model?