Click here to Skip to main content
15,892,768 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello everyone,

I need to write a regular expression which will decimal numbers like

2.1209

Which should allow four digits after decimal poin

Any suggestion or links are welcome..!!

Thanks in advance!
Posted
Comments
ZurdoDev 29-Oct-14 10:49am    
Where are you stuck? There are online regex generators if you know nothing about regex.

1 solution

Try:
\d\.\d{4}
 
Share this answer
 
Comments
KRI19 29-Oct-14 12:13pm    
Thank you!
OriginalGriff 29-Oct-14 13:08pm    
You're welcome!

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