Regex testExp = new Regex("[0-9a-zA-Z]{3,6}");
MessageBox.Show(testExp.IsMatch(txtIDS.Text).ToString());
From what I read - this regular expression should return True as long as I have an alpha numeric string of 3 to 6 characters. The minimum quantifier works but the maximum is not since it returns true with 7, 8, 9 etc. characters. Am I doing something wrong? Or perhaps C# doesn't support this ??
MessageBox.Show(testExp.IsMatch(txtIDS.Text).ToString());
From what I read - this regular expression should return True as long as I have an alpha numeric string of 3 to 6 characters. The minimum quantifier works but the maximum is not since it returns true with 7, 8, 9 etc. characters. Am I doing something wrong? Or perhaps C# doesn't support this ??