How to split the string variable line by line

Hi all,

I am having a doubt in split method.

Lets say

My string variable contains

String


India
Australia

How to split this line by line

Thanks in advance

Regards,
Naga

@Naga_Rajan

Check as below

Hope this helps you

Follow Link

Thank

@Naga_Rajan
give a try on:
YourStringVar.Split({Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
and receive an array of strings with the splits

1 Like

I have tried but the same output only coming

1 Like

@Naga_Rajan
please share the screenshot from debuging showing the variable content
Thanks

  1. Assign this Text to some Variable --> e.g. value
  2. Use " Split(value,vblf)" inside “Assign Activity” and make sure it’s variable Type is System.String --> split_value_array
  3. Use “For Each Activity” and give split_value_array
  4. Put Message Box inside For Each activity and Print “item”

This will solve your problem.

1 Like

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