Solved

Regular Expression for a float

Posted on 2006-07-11
6
4,287 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 18

Assisted Solution

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

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

813 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

19 Experts available now in Live!

Get 1:1 Help Now