how to get the first number in a string c# regex code example
Example: get first number in string C#
var input = "12985bwevgjb9812";
string firstDigit = new String(input.TakeWhile(Char.IsDigit).ToArray());
var input = "12985bwevgjb9812";
string firstDigit = new String(input.TakeWhile(Char.IsDigit).ToArray());