Regex Based Extraction - Invoice Due date and Term

Hi Community,

May i know how can i solve the extraction below using the regex based extraction? I want to extract for invoice due date and invoice term individually.
Sample 1)

Invoice Number Invoice Date Due Date Terms

Remit To 100 USD Remit To 200

XI 3849 30 MAR 2017 29 APR 2017 Within 30 days Due net

Sample 2)

Due Date 30 SEP 2017
Terms Within 30 days Due net

Sample 3)

Invoice Date Due Date Terms

30 MAR 2018 29 APR 2018 Not more than 30 days

Output Wanted (for Due Date)
Sample 1) 29 APR 2017
Sample 2) 30 SEP 2017
Sample 3) 29 APR 2018

Output Wanted (Terms)
Sample 1) Within 30 days Due net
Sample 2) Within 30 days Due net
Sample 3) Not more than 30 days

Many thanks again for the support.

Reuploaded with text file.

Term and Due Date.txt (566 Bytes)

Hello @SH_94

Try this

(?<=Due Date )\d{2}.[A-Z]{3}.\d{4}|(?<=Terms )(\S.+)|(?<=Terms\n\n\d{2}.[A-Z]{3}.\d{4}.)(\d{2}.[A-Z]{3}.\d{4})|(?<=Terms\n\n\d{2}.[A-Z]{3}.\d{4}.\d{2}.[A-Z]{3}.\d{4}.)(\S.+)|(?<=\d{2}.[A-Z]{3}.\d{4}.)(\d{2}.[A-Z]{3}.\d{4}.)|(?<=\d{2}.[A-Z]{3}.\d{4}.\d{2}.[A-Z]{3}.\d{4}.)(\S.+)

Regards
Sudharsan

Hi @Sudharsan_AIT ,

Many thanks for the prompt response.

Sorry that maybe i didnt explain in detail .May i know how to split / make into two formula, one formula purely extract for the due date and another formula purely for terms? It it because, i will fill it in different column

Many thanks

For Terms:

(?<=Terms\n\n\d{2}.[A-Z]{3}.\d{4}.\d{2}.[A-Z]{3}.\d{4}.)(\S.+)|(?<=Terms )(\S.+)|(?<=\d{2}.[A-Z]{3}.\d{4}.\d{2}.[A-Z]{3}.\d{4}.)(\S.+)

For Due Date:

(?<=Due Date )\d{2}.[A-Z]{3}.\d{4}|(?<=Terms\n\n\d{2}.[A-Z]{3}.\d{4}.)(\d{2}.[A-Z]{3}.\d{4})|(?<=\d{2}.[A-Z]{3}.\d{4}.)(\d{2}.[A-Z]{3}.\d{4}.)

Hope this Helps

Regards
Sudharsan

Hi @Sudharsan_AIT ,

I try to put into the regex builder inside the UiPath and it only capture first and third sample ( similar for term and invoice due date).

Could you try from your end inside the UiPath if you have the same condition?

Many thanks again

It is taking all the three values in regex builder as well

Make a copy of regex from the two links and try again

Regards
Sudharsan