regex pattern for numbers only code example
Example 1: just number regex
// https://regex101.com/r/qyq3PG/1
// or
/^[0-9]*$/
Example 2: regex pattern for positive numbers only
^[1-9]+[0-9]*$
Example 3: regex 10 numbers only
@"^\d{10}$"
// https://regex101.com/r/qyq3PG/1
// or
/^[0-9]*$/
^[1-9]+[0-9]*$
@"^\d{10}$"