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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find CSV - Numbers
Expression
^[0-9]+(,[0-9]+)*$
Description
Parses comma-separated numbers. Doesn't allow spaces inbetween numbers and/or between numbers and commas. Allows single number to be added. Doesn't allow sequence to end with a comma.
Matches
1321 | 1321,0,42412 | 0,1,2,3,4
Non-Matches
1321,,42412 | 12c,13d,23 | 445, | 412 , 421, 4122 | 42 4,41
Author Rating: The rating for this expression. Kristijan Prikratki
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: Thanks - Just What I needed
Name: Rajan
Date: 10/31/2015 4:03:09 AM
Comment:
Perfect solution thanks Kristijan Prikratki


Title: Just What I Needed
Name: Phil
Date: 1/9/2012 8:09:19 PM
Comment:
Perfect. Thanks Kristijan.


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