Check out example codes for "get first number in string C#". It will help you in understanding the concepts better.

Code Example 1

var input = "12985bwevgjb9812";
string firstDigit = new String(input.TakeWhile(Char.IsDigit).ToArray());

Learn ReactJs, React Native from akashmittal.com