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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(\.[0-9][0-9])?$
Description
Matches US currency input with or without commas. This provides a fix for the currency regular expression posted at http://regxlib.com/REDetails.aspx?regexp_id=70 by escaping the . (period) to ensure that no other characters may be used in it's place.
Matches
$3,023,123.34 | 9,876,453 | 123456.78
Non-Matches
4,33,234.34 | $1.234 | abc
Author Rating: The rating for this expression. Al Kahler
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: almost there
Name: RD
Date: 4/12/2020 12:09:57 AM
Comment:
matches numbers with a leading 0. ex: $011,000.00


Title: almost there
Name: RD
Date: 4/12/2020 12:09:51 AM
Comment:
matches numbers with a leading 0. ex: $011,000.00


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