Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Regular Expression for a float

Posted on 2006-07-11
6
Medium Priority
?
4,307 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 7

Accepted Solution

by:
pradeepsudharsan earned 750 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 750 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

636 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