How to split at 4 consequent spaces?

I have a string say myString=“This is my string. Name Birthdate Place”. I want to split this string where there are 4 consequent spaces. I have used myString.split(" ") but this gives compiler error as split takes only one char. How do I do this as I want to split this string and store it in another string variables using substring.

Hi @shrutika

You can force .Split to use a string by providing it like that:
yourString.Split({“ ”},StringSplitOptions.None)

See this topic for more reference.

anyVariable = YourString.ToString.Split({" "},System.StringSplitOptions.None)

Note anyVatiable is array of string.


Thank you Rashmi. This solved the issue