How to extract required data from text file which has duplicate values?

Hi @Reddy_1

Follow the below steps

Say the text is stored in variable(str)

  1. Drag a for loop and change the type argument to string and in the ‘List of items’ pass str.Split(Environment.NewLine(),StringSplitOptions.None)
  2. Inside the for loop add a if condition to check if the contains ‘Account Number’ like CurrentItem.Contains(“Account Number”)
  3. In the True side add the assign activity and inside add command to extract the account number using another split str.Split(“Account Number”,2, StringSplitOptions.None)(1).Trim

This should give you all the account numbers

cheers