How to extract unknown number of the same value from email

Hello everyone!

In this video:https://www.youtube.com/watch?v=AV59DqhJa38
Anders is extracting different values from an email using regex and storing them to a variable and writing it in an excel file. Specifically the case ID number using regex. Following this exact video, how would you go about doing the exact same thing but in this case it could be several case IDs in the same email that needs to be extracted. When i followed his video i tried doing the same thing but adding more case IDs in the same email but it never extracts anything past the first one. I want it to be able to extract every case ID no matter how many there are. could be 1 or it could be 10. What needs to be changed in what he does to make this possible?

@milad.jazayeri

Please pass the regex expression.Find matching patterns is used to extract when you have multiple matches
Hope it helps

Hi @milad.jazayeri

After the Case ID matches in the video he used a write line activity and instaead of that activity use the for each activity and pass the output of the matches actviity as the input of the for each activity and within that use the writeline activity in this way you can get all the Case ID in that particular Mail.

Regards

Sorry i’m a real beginner. How do i use the for each to pass the output of the matches as the input for the for each? What do i need to change in the for each?

Hi @milad.jazayeri

Replace that assign activity with the for each activity and pass the output of that matches as the input for that for each and with in that for each use the assign activity and give the currentItem and also if needed you can use the witeline activity also.

Regards

HI @milad.jazayeri

Please check the below:

Regards