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]+\d{0,2}(\,\d{3})*|([1-9]+\d*))(\.\d{2})?$
Description
By combining the contributions from Bri Gipson and Michael Ash in this site. I have come up with this RE to exclude the zero dollar amounts such as $0.00, 0.00, 0, etc.
Matches
$1,234,567.00 | $1234567.00 | 1234567.00
Non-Matches
$1,2345,67.00 | $0 | $0.00
Author Rating: Not yet rated. Joe Lynwood
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

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