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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Number w/wo commas and decimal
Expression
((^([\d]{1,3})(,{1}([\d]{3}))*)|(^[\d]*))((\.{1}[\d]{2})?$)
Description
This re matches numbers with our without commas and with or without exactly two decimal places.
Matches
456161 | 45622.22 | 123,234,.22 | 889,456
Non-Matches
123,22 | 123.221 | 1,2,3 | 123,21.2
Author Rating: Not yet rated. John Moore
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-2025, RegexAdvice.com | ASP.NET Tutorials