Hi,
I have a string “one,two!three,four”. I know how to get a string before “!”. Is it possible to get a string after “!” (“three,four”)?
Thanks.
Hi,
I have a string “one,two!three,four”. I know how to get a string before “!”. Is it possible to get a string after “!” (“three,four”)?
Thanks.
Assuming you’re using C#: C# Split String Examples - Dot Net Perls
You can simply build an array and take the second element:
string[] words = "one,two!three,four".Split('!');
string after = words[1];
I would ask though: why are you doing this kind of string manipulation in the first place? Perhaps there is a better way of storing your data?