I haven\'t used regular expressions at all, so I\'m having difficulty troubleshooting. I want the regex to match only when the contained string is all numbers; but with the
Use beginning and end anchors.
Regex regex = new Regex(@"^\d$");
Use "^\d+$" if you need to match more than one digit.
"^\d+$"