Regex.Split : Regex « System.Text.RegularExpressions « C# / C Sharp by API






Regex.Split

  

using System;
using System.Text.RegularExpressions;


public class MainClass {
    public static void Main() {
        string x = "Once Upon A Time In America";
        Regex m = new Regex("( )");
        foreach (string ss in m.Split(x)) {
            Console.WriteLine(ss);
        }
    }
}

   
    
  








Related examples in the same category

1.new Regex(String pattern)
2.Regex.CompileToAssembly
3.Regex.IsMatch
4.Regex.Match(String value,String pattern).Success
5.Regex.Replace
6.Regex.Match