Leading space

image_pdfimage_print
   
 

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);
    }
}