RegularExpressionValidator help please!

  • Thread starter Thread starter Lars Netzel
  • Start date Start date
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
 
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
 
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
 
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
 
Back
Top