• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4311
  • Last Modified:

Regular Expression for a float

What is the regular expression of a float greater then 0.0 and non-negative?
0
aurionpro
Asked:
aurionpro
  • 2
  • 2
2 Solutions
 
pradeepsudharsanCommented:
[0-9]+\.[0-9]*
0
 
pradeepsudharsanCommented:
/^((\d+(\.\d*)?)|((\d*\.)?\d+))$/
0
 
Elvio Lujan.Net Senior DeveloperCommented:
[0-9]+[\.]*[0-9]*
0
 
Elvio Lujan.Net Senior DeveloperCommented:
and if you need the number to be greater than 0.0 use a compare validator
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now