RegularExpressionValidator help please!

L

Lars Netzel

Using a RegularexpressionValidator to control that a user types in correct
in a textbox:

The expression I have is this: \d{2},\d{4}

This means the user shall type in something like this "10,2004", This is
supposed to be a weeknumer comma year.

Since there are a maximum of 53 weeks in a year.. how do I check so that the
user do not type in a value exceeding 53 on the first two numers?

Please help
/Lars Netzel
 
L

Lars Netzel

thanx but nothing worked after that one!

I neeed to be able to type 1-53 before the comma

/Lars

Karl Seguin said:
Try:
([0-4]\d|5[0-3]),\d{4}

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


Lars Netzel said:
Using a RegularexpressionValidator to control that a user types in
correct
in a textbox:

The expression I have is this: \d{2},\d{4}

This means the user shall type in something like this "10,2004", This is
supposed to be a weeknumer comma year.

Since there are a maximum of 53 weeks in a year.. how do I check so that the
user do not type in a value exceeding 53 on the first two numers?

Please help
/Lars Netzel
 
K

Karl Seguin

Ah, your original email led me to believe that 1 would be entered as
01...try:
^([0-4]?\d|5[0-3]),\d{4}$

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


Lars Netzel said:
thanx but nothing worked after that one!

I neeed to be able to type 1-53 before the comma

/Lars

Karl Seguin said:
Try:
([0-4]\d|5[0-3]),\d{4}

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


Lars Netzel said:
Using a RegularexpressionValidator to control that a user types in
correct
in a textbox:

The expression I have is this: \d{2},\d{4}

This means the user shall type in something like this "10,2004", This is
supposed to be a weeknumer comma year.

Since there are a maximum of 53 weeks in a year.. how do I check so
that
the
user do not type in a value exceeding 53 on the first two numers?

Please help
/Lars Netzel
 
L

Lars Netzel

Thank you that worked:)

/Lars

Karl Seguin said:
Ah, your original email led me to believe that 1 would be entered as
01...try:
^([0-4]?\d|5[0-3]),\d{4}$

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


Lars Netzel said:
thanx but nothing worked after that one!

I neeed to be able to type 1-53 before the comma

/Lars

Karl Seguin said:
Try:
([0-4]\d|5[0-3]),\d{4}

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


Using a RegularexpressionValidator to control that a user types in
correct
in a textbox:

The expression I have is this: \d{2},\d{4}

This means the user shall type in something like this "10,2004", This is
supposed to be a weeknumer comma year.

Since there are a maximum of 53 weeks in a year.. how do I check so that
the
user do not type in a value exceeding 53 on the first two numers?

Please help
/Lars Netzel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Help please 8
Code help please 4
Please help 7
Please, help me. 1
Malicious Coding Help Please 5
I dont get this. Please help me!! 2
Need help again please 19
Can't solve problems! please Help 0

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top