Substring a string with each space found

How to substring a string with each space found on the variable.
Example
Input: Hello how are you
Output: Array of strings with values Hello, how, are, you.
Please help on this.

Hi,

split.xaml (9.7 KB)

3 Likes

Hi @ajith.jose,
You can use the String Split function and the output will be coming in an Array of String.
You have to iterate through the loop in order to extract the words one by one.
Thanks,
Jiban

1 Like

Then is there any way to split with respect to some characters like comma?

You can use simple Replace function here, [Your_String].Replace([Old Value], [New Value])

e.g. Let consider “Hello How Are You” is the string stored in variable called MyString, then Use Assign activity set MyString = MyString.Replace(" ", ", ").ToString

I hope this is the easiest way rather than using Split and loop the Result String array :wink:

@cthamizh
Output: Array of strings with values Hello, how, are, you.

@ajith.jose

You can use any type of separator in split string activity

1 Like

Thank you guys.