Try something like this:
String output = Regex.Replace(input, @"^[^\d]+", String.Empty);
Here's how the regex works:
^[^\d]+
^binds the expression to the beginning of the line - this is a set of characters that matches all non-integer values qualifies , matching it one or more times
[^\d] + [^\d]
So basically this regular expression matches all non-integer characters in the string until an integral character is found.
source
share