You can even try extension functions:
string sample = "2. hi";string result = string.Concat( sample .SkipWhile( char.IsWhiteSpace ) .SkipWhile( char.IsDigit ) .SkipWhile( ( c, i ) => i == 0 && c == '.' ) .SkipWhile( char.IsWhiteSpace ) );
No comments:
Post a Comment