473,397 Members | 2,084 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,397 software developers and data experts.

validation expression is this correct?

Hi I am using a validationexpression with a regular expression validator.
In the properties window for the expression I have
[\D(3)]|[-]|[\D(3)]|[-]|[\D(4)]|[-]|[\d(5)]|[-]|[\d(4)]
as I want the following format,
abc-efg-hijk-12345-6789
abc efg hijk all must be letters upper case, I also need to check for the
hyphens -,
the numbers 123456789 can be any digits.
Anyhow seems like it is not working correctly, thanks.
--
Paul G
Software engineer.
Nov 18 '05 #1
3 1378
Got this working now, using form like \D{3}-\D{3}
"Paul" wrote:
Hi I am using a validationexpression with a regular expression validator.
In the properties window for the expression I have
[\D(3)]|[-]|[\D(3)]|[-]|[\D(4)]|[-]|[\d(5)]|[-]|[\d(4)]
as I want the following format,
abc-efg-hijk-12345-6789
abc efg hijk all must be letters upper case, I also need to check for the
hyphens -,
the numbers 123456789 can be any digits.
Anyhow seems like it is not working correctly, thanks.
--
Paul G
Software engineer.

Nov 18 '05 #2
I think this ought to work:
([A-Z]{3}\-){2}[A-Z]{4}\-\d{5}\-\d{4}

couple problems with your things, first off ( ) is for captures, whereas {}
is for counts...\D will do any non-dights, you only want uppercase letters

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.com...
Hi I am using a validationexpression with a regular expression validator.
In the properties window for the expression I have
[\D(3)]|[-]|[\D(3)]|[-]|[\D(4)]|[-]|[\d(5)]|[-]|[\d(4)]
as I want the following format,
abc-efg-hijk-12345-6789
abc efg hijk all must be letters upper case, I also need to check for the
hyphens -,
the numbers 123456789 can be any digits.
Anyhow seems like it is not working correctly, thanks.
--
Paul G
Software engineer.

Nov 18 '05 #3
ok thanks think that is what I was looking for.

"Karl Seguin" wrote:
I think this ought to work:
([A-Z]{3}\-){2}[A-Z]{4}\-\d{5}\-\d{4}

couple problems with your things, first off ( ) is for captures, whereas {}
is for counts...\D will do any non-dights, you only want uppercase letters

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Paul" <Pa**@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.com...
Hi I am using a validationexpression with a regular expression validator.
In the properties window for the expression I have
[\D(3)]|[-]|[\D(3)]|[-]|[\D(4)]|[-]|[\d(5)]|[-]|[\d(4)]
as I want the following format,
abc-efg-hijk-12345-6789
abc efg hijk all must be letters upper case, I also need to check for the
hyphens -,
the numbers 123456789 can be any digits.
Anyhow seems like it is not working correctly, thanks.
--
Paul G
Software engineer.


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Stefan Richter | last post by:
Hi, after coding for days on stupid form validations - Like: strings (min / max length), numbers(min / max value), money(min / max value), postcodes(min / max value), telefon numbers, email...
2
by: wumingshi | last post by:
Hi, When validating an XML instance, sometimes the schema is not enough to expression the validation rules. Additional validation rules may be expressed in an application-specific way. For...
10
by: dries | last post by:
A friend of mine has a problem with his credit card validation routine and it is probably a simple thing to solve but I cannot find it. It has to do with the expiry dates. What happens is that as...
41
by: Gérard Talbot | last post by:
Cross-posted to: comp.infosystems.www.authoring.html and alt.html Followup-to: comp.infosystems.www.authoring.html 1- One day, I stumbled across a website that offers to validate webpages. What...
18
by: Steve | last post by:
Hi I have a really weird problem and any assistance would be welcome. I have developed an app in Access 2002. The app runs perfectly on the development machine. I have packaged the app using...
6
by: Chuck | last post by:
A97. A database has a table: tblA which has a single text field, B. It is a primary field, indexed and no duplicates. It is used as a lookup for table tblC. A form based on tblA is used to add...
2
by: Nazir | last post by:
Hi I'm using a regular expression validator, but if spaces are entered, it bypasses the validation! I'm using ^{5,100}$
3
by: Big E | last post by:
I'm using SQL Server and ASP.Net. I would like the users when typing in their passswords to enter in: 1. At least 6 characters 2. At least 1 number 3. At least 1 letter. I have looked at the...
2
by: Coleen | last post by:
I can't remember the correct way to write a custom regular expression validator, and the help file for VB.net is not terribly helpful...it does not give any real world examples. I've got the main...
5
by: KJ | last post by:
I need help. I have a checkbox and two textboxes on a webform. How can I validation if a person either enters something in the two textboxes OR the checkbox? I tried using a custom validator...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile 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: 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
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.