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
Bjarni
NA
3
2.2k
trouble with C# and regular expressions
Feb 21 2007 5:59 AM
Hi, I am trying to use regular expression to check if a string is a number and I do not want leading zeros so "123" is legal but "0123" is not and I am using the following: Regex objNaturalPattern = new Regex("[1-9][0-9]*"); This works fine detecting if it is a number or alpha but it always gives me true for leading zeros, how can I make the zeros in front give me a false? Thanks
Reply
Answers (
2
)
calling a stored procedure and retrieving an output parameter
DateTime application