Click here to Skip to main content
15,033,147 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

Can anyone give regular expression to validate amount field.
So that i match that regex to my amount text field.

My regex should satisfy the below condition.

1) Number.Number (e.g 99.99)
2) Number. (e.g 99.)
3) .Number (e.g .99)
4) Number (e.g 9999)

***But it should not allow single dot (.)

I used the below regex to amount field in the designer:

I want the matching regex to satisfy the above conditions.

Thanks in advance.
StianSandberg 18-Jul-12 6:47am

The following regex works for me to satisfy all of the above conditions.


read this very good Article[^]

#Only for numbers

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900