Loop from 2 Matches in UIPath

I wanted to loop from the result of each matches and then match the index of the result .
323

The first regex match is to get the dates and the second one is to get company names
first regex is to get dates : “^(\d{2}/\d{2}/\d{2} | \s)”
2nd regex to get company : “”(?<=\d{3,8}\s+)[A-Z].?(?=\s+[A-Z]{3}\s$)""

Data where I am extracting the date ang company name which is a string

cKsBRobot Master

RajivKumar12

3h

I was talking about this data:

 "Filtered Data: −−DATE−−       ECOA   KOB     MEMBER−NO
06/12/20       B      QM      02004946        TEST DATA MORTGAGE                                               TRU
04/22/20       B      BC      2844550        COMPANY XCYS                                                        XPN
                      BC      03575459        CAPITAL ONE                                                       TRU
                      BB      484BB05812      CAPITALTWO                                                        EFX
04/16/20       B      FR      3996926         CRET                                                           XPN
                              181ZB14416      CREDOS                                                           EFX
                      FM      01207005         BANK  R                                                TRU"

Output I wanna chieved.

06/12/20  TEST DATA MORTGAG
04/22/20 COMPANY XCYS
04/22/20  CAPITAL ONE
04/22/20  CAPITALTWO
04/16/20  CRET
04/16/20 CREDOS
04/16/20  BANK  R

Any idea thanks.

@RajivKumar12

Build a datatable

write the data collected from Date using Add row

After that loop the Company and write the datatable column with Company

Dt.Rows(indexofForeach).Item("ColumnName") = Value

For reference check below post

Hope this helps you

Thanks

what do you mean by this Dt.Rows(indexofForeach).Item(“ColumnName”) = Value?

@RajivKumar12

Dt - Your Datatable
Rows - Rows of Datatable
Index - Take index of Foreach
Column Name - Your Column Name to write
Value - item.ToString

You have to write the Company value to the Datatable, thats where it is used

You can refer the post why we used

Mark as solution if this helps

Thanks

can you provide an example Sir , here is my current progress Main.xaml (11.4 KB)

this is the output I wanna achieved for example

06/12/20 TEST DATA MORTGAG
04/22/20 COMPANY XCYS
04/22/20 CAPITAL ONE
04/22/20 CAPITALTWO
04/16/20 CRET
04/16/20 CREDOS
04/16/20 BANK R

@RajivKumar12

Share your project folder instead of single xaml file

Project.Json is also required

Thanks

Main.xaml (11.4 KB) project.json (998 Bytes)

if date is empty sir get the parent date.

@RajivKumar12

Check as below

You can place If condition to check the null and proceed with your logic

Mark as solution if this helps

Thanks

can you please share the file Sir ?

@RajivKumar12

BuildDatatable.zip (3.2 KB)

Thanks

One last time Sir , my last problem is about the date , I wanted to get the parent date . do you have an idea about that >? Thank you

@RajivKumar12

Lets make another post with your detailed input and required output for date

Thanks

@ksrinu070184 Here is the new topic Sir Regex extracting and parsing Date

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