Method 1: Open vs.net to create a console project. Then input the followingProgram. String S = "abcdeabcdeabcde "; String [] sarray = S. Split (''c ''); Foreach (string I in sarray) Console. writeline (I. tostring ()); Output the following result: AB Deab Deab De We can see that the result is separated by a specified character. What if we want to use multiple characters for segmentation, such as C, D, and E? Well, we use another constructor: Change to string S = "abcdeabcdeabcde String [] sarray1 = S. Split (New char [3] {'C', ''d', ''e ''}); Foreach (string I in sarray1) Console. writeline (I. tostring ()); The following result can be output: AB AB AB In addition to the above two methods, The third method is to use a regular expression. Create a console project. Then add using system. Text. regularexpressions; 'Http: // www.knowsky.com Main (): change System. Text. regularexpressions String content = "agcsmallmacsmallgggsmallytx "; String [] resultstring = RegEx. Split (content, "small", regexoptions. ignorecase) Foreach (string I in resultstring) Console. writeline (I. tostring ()); Output the following result: AGC Mac Ggg Ytx |