String Split with two or more characters

Hi how do I split a string using two or more characters?

For example my string is “A. Hello A.Bye”, and I want to split “A.” so that my result would be “Hello” and “Bye”

Thanks.

HI @Edmundz,
arrOutput=strinput.Split(new string[] { "A." }, StringSplitOptions.None)
arrOutput(0).ToString() - > Hello
arrOutput(1).ToString() -> Bye

Regards,
Arivu

HI @Edmundz,
Str_arr_Out=Strinput.Split(new string() { “A.” }, StringSplitOptions.RemoveEmptyEntries)
you can use for each loop to iterate over all the values.

Perfect. Thank you.

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