3
Answers

Regular Expressions

Jeff

Jeff

14y
2.9k
1
Hi - I'm trying to use a regular expression to validate a data entry that has to be exactly 8 numeric digits.  I tried
Regex
_validGPID = new Regex(@"^\d{8}");
But that only catches entries that are less than 8 characters, not more.  I also tried
Regex
_validGPID = new Regex(@"^\d{8,8}");
But that didn't work either.
Can anyone help me out?
Answers (3)
Next Recommended Forum