473,382 Members | 1,420 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,382 software developers and data experts.

accept only numbers onKeyPress without multiple dashes

accept only numbers onKeyPress without more than 2 dashes (max 2, and no 2 dashes together). 11 max total length
i.e.
123-345-567 YES
Or
-123345567- YES
Or
--123456789 NO
Or
As1234567 NO
Or
#355534gg NO
Etc.
May 20 '10 #1
1 1791
gits
5,390 Expert Mod 4TB
what do you have so far?

kind regards
May 21 '10 #2

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*"
5
by: social_engin33r | last post by:
Hello, I've been asked to help someone set up a database. One of the fields in the database is a text field that holds data imported in this format: 11-A-11-11 The users prefer to see the...
9
by: Tim Conner | last post by:
Is there a way to write a faster function ? public static bool IsNumber( char Value ) { if (Regex.IsMatch( Value.ToString(), @"^+$" )) { return true; } else return false; }
6
by: Woody Splawn | last post by:
We have access to Infragistics etc., but we would like to make use of a regular VS textbox so that it accepts only numbers. We have discovered that if you bind an integer field to a textbox, for...
30
by: vim | last post by:
hi How to find biggest of three numbers without comaprimg numbers
60
by: Shawnk | last post by:
Some Sr. colleges and I have had an on going discussion relative to when and if C# will ever support 'true' multiple inheritance. Relevant to this, I wanted to query the C# community (the...
2
by: mike | last post by:
Hello fellow C++ experts, is there any dramatic difference between multiple inheritance: struct MyType4 : MyType1, MyType2, MyType3 { int MyInt; }; and: struct MyType4 {
3
by: Chris | last post by:
Hi, How can I only accept numbers in a textbox? Thanks
2
by: naseesalih | last post by:
i want code for accepting numbers only.
1
by: apartain | last post by:
I have been looking in help for an input mask, but can't find what I need. I need to only accept numbers, but the digits can be anywhere from four digits to nine digits. I was using &&&&&&&&&...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.