regex int or string anything code example Example: regex for numbers Regex regex = new Regex(@"^\d$");