I am having the Text file and contains the text as shown below
D1234 First Value $0.00
D5678 second - Value$5.00
D2356 Third value $0.00
D78967 Fourth Value$0.00
D3678 Fifth value $0.00
Soon…
Here i would like to extract the Value which is starting with D follwed by 4 numeric values(EX: D1234) and their corresponding text(First Value $0.00) in another value.
I would like to loop and have to extract.
I am able to get the first value but while loo[ing I am facing the issue.
Using Regex groups will allow you to collect both elements with one pattern. Take a look here to preview the pattern. Like this:
High Level steps to achieve this:
Step 1: Use a Matches activity to collect your results
Step 2: Insert a For Each
Step 3: Refer to each as group like this: “item.Groups(1).ToString”
“1” equates to the corresponding group from the highlighted image above.
Step 4: Assign each group to a result/save in a dataTable etc
I have made a demo workflow you can use. Main.xaml (8.1 KB)