RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^(\d|,)*\d*$
Description
matches 0 and all positive integers only. will accept comma formatting only.
Matches
1234 | 1,234 | 1,234,567
Non-Matches
1234.0 | -1234 | $1234
Author Rating: The rating for this expression. Donald Schneider
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: fail
Name: Greg
Date: 2/28/2013 11:12:03 AM
Comment:
allows 333,3333333


Title: This needs some work
Name: Michael Ash
Date: 2/2/2004 5:17:09 PM
Comment:
This will match a lot of stuff such as 1,,,,0 or 1,2,3,45 or 12345,6789,01 You may want to do a search on some of the currency regexs in this library and find one that allows seperators and use it as a base.


Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials