How can we split string where we get empty line

How can we split string where we get one or more empty lines in a string,
msgbox

text.Split({System.Environment.Newline},System.StringSplitOptions.RemoveEmptyEntries)
This will split with new line and empty space will be ignored

its not working

My mistake, Try this :sweat_smile: text.Split(System.Environment.Newline,System.StringSplitOptions.RemoveEmptyEntries)

Or

Text.split(" “,”") :slight_smile:

and a screen shot of what you are getting after this

Hi @Mohsin_Inamdar,

Try this

txtStr.Split(New String() { Environment.NewLine + Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)

@Mohsin_Inamdar,
I recently publish custom activity to make life easy. You may want to use it. Its very straightforward.

Example:

Let me know if you need assistance or if you are still facing issue.
Cheers

1 Like