C#分割字符串

using System.Text.RegularExpressions;

e.g. 除去字符串"Hi, Boy. This is a test. said by Boyson, two months ago."中的字符串"Boyson"

            String test = "Hi, Boy. This is a test. said by Boysome, two months ago";
            String ss = "Boysome";
            string[] sArray = Regex.Split(test, "Boysome");

            foreach (string i in sArray)
               Console.Write(i.ToString() );

你可能感兴趣的:(字符串)