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{1,3})(\,\d{3})*)(\.\d{2,})?$
Description
This pattern handles currency including the following: optional period with two or more digits to the right of the period optional commas optional dollar sign($)
Matches
$3,333,333,333 | $333333 | $3,333.33
Non-Matches
3,33 | 3333,333,333 | 333.3
Author Rating: Not yet rated. Matt Wickless
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: Systems Administrator
Name: Ron Allen
Date: 7/16/2004 1:55:38 PM
Comment:
This one works well for my needs, with only a slight modification to allow a leading space and negative values. Thanks!


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