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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Amount or Price validator
Expression
/^(?!0,?\d)(?:\d{1,3}(?:([, .])\d{2})?(?:\1\d{2})*|(?:\d+))((?!\1)[,.]\d{1,2})?$/u
Description
validate amount or price check: Double value
Matches
10 | 10.00 | 0.50 | 0.01
Non-Matches
01 | 10.0 | 0.5 | 10.500
Author Rating: The rating for this expression. regex maker
Source http://api.cakephp.org/2.3/source-class-Validation.html#521-536
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-2024, RegexAdvice.com | ASP.NET Tutorials