Multiple spaces, using \"[\\s]+\" : Regular Expression : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Regular Expression »

 

Multiple spaces, using \"[\\s]+\"








    
 

using System;
using System.Text.RegularExpressions;


public class MainClass {
    public static void Main() {
        string v = "Once   Upon A Time In   America";
        Regex o = new Regex(@"[\s]+");
        foreach (string ss in o.Split(v)) {
            Console.WriteLine(ss);
        }
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Regular Expression