Date: 8/30/2006 3:36:53 AM
Hi, I required a regular expression for date validation (mm/dd/yyyy) in my ASP.NET application and I font Steven Smith's pattern perfect. Thanks.
Date: 12/9/2005 6:51:00 AM
OK, got it finally !
Date: 12/8/2005 5:58:19 PM
Oups, sorry for my last comment
I tried to switch to DD/MM/YYYY and THAT doesn't work
And I am still trying to make it work w/ no luck. So if u could help me on that, i really appreciate
Title: Nice work
Date: 12/8/2005 5:51:30 PM
Hi, i tested it but it doesn't seem to work for MM = 01 to 09, i may be wrong
Nice work though !
Title: Re: Performance??
Date: 1/11/2004 12:07:05 PM
Dear Steve, Darran,
please excuse my rude way of commenting this regex. It certainly was unrespectful to Steve who has contributed so many regexs to this page.
My 'protest' was against the regex in terms of regular use, performance. As Steve wrote, used in a loop he would do it different, but still I don't 'like' it. Steve is mixing pattern matching with logic which in some circumstances works out brilliant by some tricky regular expressions, but in this case I think it's the wrong approach.
I do love regular expressions and usually catch myself in doing allmighty regexs but in most cases it's not quite useful. Such a long regular expression might run fast for a quick validation, but when processing tons of data, you will recognize that mixing pattern matching with logic will let you sit in front of your code waiting for the process to end. At work we run pattern matching algorithms which process GB of data and I learned that quick detection if the data is of correct format l
Title: Constructive criticism is good
Name: Darren Neimke
Date: 1/8/2004 5:08:09 AM
Niko, first a couple of things:
- Yes, Steve is a friend of mine
- Yes, I am the webmaster of this site
... right, now onto the message :-)
I really value the fact that you took the time to offer feedback on this pattern. One of the main reasons that I added comments to the site ( there's also an Rss feed for them here http://www.regexlib.com/RssComments.aspx ) was so that users that visit this site in 6 months time from now would be able to read the comments and use them to help determine the quality of a pattern. Given that, it would also be good (for everyone) if, you could also take the time to mention why the pattern is so non-performant when providing feedback.
Without inspecting the pattern too closely myself, I imagine that you are protesting against either the alternation or the amount of capturing that is going on.
Anyways, I don't want to turn this into a rant, so to Niko, thanks again for your valuable input :-) and to Steve, stop writing sloppy
Name: Steven Smith
Date: 1/8/2004 3:41:24 AM
Honestly, no. I've never had a situation where a regular expression was impacting my application's performance. If I had to use one in a loop, I might look at it differently, but for validation, this is certainly 'fast enough'.
Date: 1/8/2004 3:16:14 AM
Ever considered performance when creating such a regex?
Title: Most Simply
Name: Hakim SALHI
Date: 8/20/2003 3:46:45 AM
this regular expression is valid, and most simply