Getting Data from Text file

I want these value irrespective of row count now in this input we have 4 it can be multiple so I just need these value from all the available rows

Hi @Chirag1991

Below is the Workflow for the same :-
MainChirag.xaml (13.6 KB)
ATTACH2.txt (1.7 KB)

Output :-

image

image

image

image

Regex used in Matches Activity as shown below :-

"(?<=\s+[A-Z]([A-Z]|\d)\s)(\d{8}\s\d{4}).+(\d{6})"

regexr.com/5a239

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

Happy Automation :raised_hands:

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

1 Like

Thanks a lot I just have one last question in below string
replaceStr.Split(" “c)(2).StartsWith(“M”) And replaceStr.Split(” "c)(2).Length.Equals(2)

If something is not fixed whether it starts with M or W it can be any alphabet so in that condition what I should put

Hi @Chirag1991

As you have shared the Input based on that i saw only the value startswith “W” and have Length as 2 if it is available.
And if it is not available then the next Word comes in his place which is neither startsWith “W” nor have the Length as 2.
So i have put that condition der.

Now coming back to your question
You are saying that the value may startWith “W” or “M” or it can be any alphabet so if such situation is going to arise in future then just Remove the Condition of StartsWith and only keep the Length Condition as below :-

replaceStr.Split(” "c)(2).Length.Equals(2)

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

Happy Automation :raised_hands:

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

Thanks you too Happy Automation you made my day

Hi @Chirag1991

The Solution which i provided that helped you should get marked as solution so that if someone arises the same query in future then they can refer it.

Mark as solution and like it :slight_smile:

Happy Automation :raised_hands:

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

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