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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^([1-9]{1}[0-9]{0,7})+((,[1-9]{1}[0-9]{0,7}){0,1})+$
Description
Validate a comma delimited string of integer between 1 and 99999999 (change {0,7} to whatever you need). No zero leading.
Matches
1,2,3455,12345678 | 23045,34678,2892 | 1,2,99999999
Non-Matches
01,234,567 | 123,0445,3434, | 121,,1212,,12,
Author Rating: Not yet rated. Ivan Rodriguez
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: Some good guy suggested better expression
Name: Ivan Rodriguez
Date: 2/26/2004 4:38:22 PM
Comment:
^([1-9][0-9]{0,7},)*[1-9][0-9]{0,7}$


Title: Remove the first +
Name: Michael Ash
Date: 2/25/2004 10:21:58 AM
Comment:
The first + sign allows 123456789123456789123456789 to pass as the first number


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