I am trying to find a way of checking if a string starts with only one "X" but not 2 X's in a regular expression.
So I think I have tried
Regex.IsMatch(teststr, "^[^X]{1}?^[XX]");
Regex.IsMatch(teststr, "^[^X]{1}?");
Regex.IsMatch(teststr, "^[^X]{1}");
Regex.IsMatch(teststr, "^[^X]?");
The results should be, if string Starts with 1 X only then give me all except the ones that start with only 1 X. A string with 2 X's is allowed