Click here to Skip to main content
15,499,046 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Need Regular Expression for Amount Field which allows only numbers and one dot.
Posted
Updated 29-Jan-15 18:57pm
v2
Comments
BillWoodruff 28-Jan-15 1:51am    
What have you tried so far ? Show some code.
dn_MIT 29-Jan-15 4:53am    
Supports only numbers : ^[0-9]*[.][0-9]*$
Tejas Vaishnav 28-Jan-15 9:48am    
If my answer solve your problem, please accept it as answer and rate it.

1 solution

Hey you can try this

Without - (minus) sign

C#
^\d+(\.\d+)?$


with - (minus) sign

C#
^-?\d+(\.\d+)?$
 
Share this answer
 

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