Link to home
Start Free TrialLog in
Avatar of steve_mick972
steve_mick972

asked on

Regular expression for 9 digit number.

I am trying a match a 9 digit number.

 i am using the following code:

Regex my9DigitNumber = new Regex(@"9[0-9]");

it does not seem to work. Any Ideas?
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BurntSky
BurntSky

You could also use:

"\d{9}"

To add to Bob's tutorial suggestion check out this site too:
http://www.regexlib.com/