Solved

Regular Expression for a float

Posted on 2006-07-11
6
4,285 Views
Last Modified: 2012-08-13
What is the regular expression of a float greater then 0.0 and non-negative?
0
Comment
Question by:aurionpro
  • 2
  • 2
6 Comments
 
LVL 7

Accepted Solution

by:
pradeepsudharsan earned 250 total points
ID: 17079692
[0-9]+\.[0-9]*
0
 
LVL 7

Expert Comment

by:pradeepsudharsan
ID: 17079714
/^((\d+(\.\d*)?)|((\d*\.)?\d+))$/
0
 
LVL 17

Assisted Solution

by:Elvio Lujan
Elvio Lujan earned 250 total points
ID: 17081696
[0-9]+[\.]*[0-9]*
0
 
LVL 17

Expert Comment

by:Elvio Lujan
ID: 17081715
and if you need the number to be greater than 0.0 use a compare validator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now