Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: regular expression madness


Message #1 by "Greg Partin" <GPartin@c...> on Mon, 24 Jun 2002 05:46:31 -0700
Can someone who is more gifted with regular expressions tell me why the
following:

ValidationExpression="^([1-9]|1[0-2])/([1-9]|[12][0-9]|3[01])/\d{4}$"

is not validating this formt:

mm/dd/yyyy

I have been looking at it too long, I think!

thanks,
Greg

Greg Partin
Software Engineer

CompassLearning, Inc.
2400 N. Commerce Pkwy.
Suite #404
Weston, FL  33326

Greg Partin
Software Engineer

CompassLearning, Inc.
2400 N. Commerce Pkwy.
Suite #404
Weston, FL  33326
Message #2 by David Barnes <DavidB@w...> on Mon, 24 Jun 2002 14:02:36 +0100
Hi Greg

I'm not an expert with regular expressions, so have no idea what the problem
is with yours.

However, if all you want is to find an expression that works, then there's a
great site for this sort of thing -- www.regexlib.com

If you do a search for 'mm/dd/yy' there, it gives a few results that provide
various levels of validation.

Cheers

David

PS The site isn't affiliated with Wrox (as far as I know), and this is a
personal recommendation from me. I can't vouch for the expressions'
accuracy.

> -----Original Message-----
> From: Greg Partin [mailto:GPartin@c...]
> Sent: 24 June 2002 13:47
> To: aspx_beginners
> Subject: [aspx_beginners] regular expression madness
> 
> 
> Can someone who is more gifted with regular expressions tell 
> me why the
> following:
> 
> ValidationExpression="^([1-9]|1[0-2])/([1-9]|[12][0-9]|3[01])/\d{4}$"
> 
> is not validating this formt:
> 
> mm/dd/yyyy
> 
> I have been looking at it too long, I think!
> 
> thanks,
> Greg
> 
> Greg Partin
> Software Engineer
> 
> CompassLearning, Inc.
> 2400 N. Commerce Pkwy.
> Suite #404
> Weston, FL  33326
> 
> Greg Partin
> Software Engineer
> 
> CompassLearning, Inc.
> 2400 N. Commerce Pkwy.
> Suite #404
> Weston, FL  33326
> 
> 
Message #3 by "Greg Partin" <GPartin@c...> on Mon, 24 Jun 2002 06:18:35 -0700
Thanks David!

Greg

Greg Partin
Software Engineer

CompassLearning, Inc.
2400 N. Commerce Pkwy.
Suite #404
Weston, FL  33326

>>> DavidB@w... 06/24/02 09:02AM >>>
Hi Greg

I'm not an expert with regular expressions, so have no idea what the
problem
is with yours.

However, if all you want is to find an expression that works, then
there's a
great site for this sort of thing -- www.regexlib.com 

If you do a search for 'mm/dd/yy' there, it gives a few results that
provide
various levels of validation.

Cheers

David

PS The site isn't affiliated with Wrox (as far as I know), and this is
a
personal recommendation from me. I can't vouch for the expressions'
accuracy.

> -----Original Message-----
> From: Greg Partin [mailto:GPartin@c...] 
> Sent: 24 June 2002 13:47
> To: aspx_beginners
> Subject: [aspx_beginners] regular expression madness
> 
> 
> Can someone who is more gifted with regular expressions tell 
> me why the
> following:
> 
>
ValidationExpression="^([1-9]|1[0-2])/([1-9]|[12][0-9]|3[01])/\d{4}$"
> 
> is not validating this formt:
> 
> mm/dd/yyyy
> 
> I have been looking at it too long, I think!
> 
> thanks,
> Greg
> 
> Greg Partin
> Software Engineer
> 
> CompassLearning, Inc.
> 2400 N. Commerce Pkwy.
> Suite #404
> Weston, FL  33326
> 
> Greg Partin
> Software Engineer
> 
> CompassLearning, Inc.
> 2400 N. Commerce Pkwy.
> Suite #404
> Weston, FL  33326
> 
> 


  Return to Index