Leading space : Regular Expression : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Regular Expression »

 

Leading space








    
 

using System;
using System.Text.RegularExpressions;


class RXmodifyingApp {
    static void Main(string[] args) {
        string s = "     leading";
        string e = @"^\s+";
        Regex rx = new Regex(e);
        string r = rx.Replace(s, "");
        Console.WriteLine("Strip leading space: {0}", r);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Regular Expression