Jeff

Jeff

  • NA
  • 3
  • 2.8k

Regular Expressions

Sep 14 2010 7:29 PM
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)