regular expression for only numbers and 11 digit code example Example 1: regex 10 numbers only @"^\d{10}$" Example 2: regex pater for only 4 or 6 digits ^([0-9]{4}|[0-9]{6})$