I have three string called This_is string1
and This is string2
There_is string3
How to split these 3 strings after \"This_\", \"T
The answer is simple, you can use the String.Split method, specifying the multiple delimiters (in your case the underscore and whitespace):
str.Split(new char[]{'_',' '})
LinQPad result:
If you want to split only the first part, you can use the 2nd overload of String.Split:
str.Split(new char[]{'_',' '}, 2);
and this is the result in LinQPad: