TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ashley Jackson
NA
73
0
Regex & Regular Expressions
Nov 1 2006 11:34 AM
I'm trying to use regular expressions to validate a string before converting it to a number. The string must be all numeric (obviously) and exactly 8 digits long. I have tried all of the follow regular expressions:
"[0-9]{8}"
"\d{8}"
"[0-9]{8}$"
"[0-9]{8,8}"
The problem I am having is that the expression returns a Match.Success as long as the string is at least 8 digits long. If it is 9 ot returns OK, and I want it to return false.
Any Ideas????
Thanks Ash..
Reply
Answers (
3
)
Unable to show the updated file using app domain
User control from Radio Button