Based on my understanding of Regex, the string “10†matches the Regex “^([0-9])(\)$â€. To validate it, I tried the regex and the text “10†on the website and it worked. But when I tried the same with C# code, it failed.Only by adding a "?", making the regex “^([0-9])(\)?$†makes the string "10" validate against the regex. I am confused why it behaves differently in the C# Regex class.