C#
string s="Endmemo.com CSharp String Tutorial"; string[] arr=s.Split(' '); //divided by space foreach(string elem in arr) { ... } //divided by letter t and T, case insensitive string[] arr=s.Split('t',s, StringSplitOptions.IgnoreCase);
string s="'Endmemo.com','CSharp','23.432.32.6'"; //divided by substring ',' string[] arr=s.Split(new string[] {"','"}, StringSplitOptions.None); foreach(string elem in arr) { ... }
string str = "<table width=\"100%\"><tr>123</tr><tr>abc</tr><tr>ZZZ</tr></table>"; string[] blocks = Regex.Split(str, @"\<\/tr\>", RegexOptions.IgnoreCase);
elem = elem.Replace("“", "\""); elem = elem.Replace("\\""", "\""); elem = elem.Replace("”", "\""); elem = elem.Replace("&", "&"); elem = elem.Replace("’", "'"); elem = elem.Replace("—", "-");