Check out example codes for "remove all non number in c#". It will help you in understanding the concepts better.

Code Example 1

public static string RemoveNonNumeric(string value) => Regex.Replace(value, "[^0-9]", "");

Learn ReactJs, React Native from akashmittal.com