Solved

Regular Expression for a float

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C#, asp.net MVC, sql server, LINQ 3 37
Please explain the parts of these 2 LINQ expressions 3 53
Need syntax help building hyperlink 2 22
Easy filter aspnet 2 24
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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

840 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