473,413 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

numbers and a full stop regular expression

69
hi guys,

how can I validate a textbox with a reg exp validator that says that the textbox must have only digits and no more than one full stop....I am testing for a float.......eg
the user can enter 4, 69, 60.356,7.3,24564

can some one please help me with this expression
Apr 21 '08 #1
2 2165
Mr Gray
47
Look at:

http://regexlib.com/

It is a great place to learn Regular Expression and search for ones that may fit what you need.
Apr 21 '08 #2
shweta123
692 Expert 512MB
Hi,

Which platform are you using ?
You can try this regular expression for checking the float numbers :

RegexOptions options = RegexOptions.None;
Regex regex = new Regex(@"^(\d)*(\.)(\d)*$", options);
Apr 21 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: gary | last post by:
I want to pick all intergers and decimal numbers out of a string. Would this be the most correct regular expression to use? "\d+\.?\d*"
0
by: Mike | last post by:
I'm trying to come up with a regular expression that matches numbers with commas... but doesn't match numbers formatted without commas. The problem is that I'm trying to parse a file where the...
8
by: Merlin | last post by:
Hi there, I would like to add a plausability check for numbers with JS, but regex is not really a strong knowledge of mine. Can anybody give me a hint, or lead me to the right script for doing...
11
by: tlyczko | last post by:
Hello Rob B posted this wonderful code in another thread, http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/c84d8538025980dd/6ead9d5e61be85f0#6ead9d5e61be85f0 I could not...
1
by: paulsmith5 | last post by:
Hi, I'm developing a web app and I want to validate a users input on a form. I need a regular expression to validate a string which must begin with a letter (i.e. A-Z or a-z) and must have 5...
4
by: =?Utf-8?B?ZG1idXNv?= | last post by:
I am looking for a regular expression that would filter numbers in my vb.net application. The integer part could have up to 5 digits and the fractional part up to 2 digits. I came up with the...
8
by: cokofreedom | last post by:
I was reading up on this site http://www.noulakaz.net/weblog/ 2007/03/18/a-regular-expression-to-check-for-prime-numbers/] of an interesting way to work out prime numbers using Regular Expression....
8
by: Avi | last post by:
Hi all, I'm using string Replace(string oldValue, string newValue) and would like it to replace only full words that matches oldValue and not when oldValue is a substring of a larger word. ...
2
by: =?Utf-8?B?QW5keQ==?= | last post by:
Hi. Has anyone a reliable regular expression for UK phone numbers? Done the usual google search and on regexlib but so far nothing seems close to actually working. Maybe of our stupid phone...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.