You are not Logged in
Would you like to Login or Register

Today is: 11 March 2010
Check this months hot topics

Date Regular Expression (dd/MMM/yyyy)

The following matches:

  • 01/JAN/2007
  • 22/Feb/2006

But doesn't match:

  • 01/01/2007
  • 22/02/2007
  • 01 Jan 2007
^(([0-9])|([0-2][0-9])|([3][0-1]))\/(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\/\d{4}$
kick it on DotNetKicks.com del.icio.us digg Mister Wong YahooMyWeb Reddit Furl Spurl blogmarks
Paul Hayman Skype
Author : Paul Hayman
Published : 26 October 2007

Paul is the COO of kwiboo ltd consultant and has more than a decade of IT consultancy experience. He has consulted for a number of blue chip companies and has been exposed to the folowing sectors: Utilities, Telecommunications, Insurance, Media, Investment Banking, Leisure, Legal, CRM, Pharmaceuticals, Interactive Gaming, Mobile Communications, Online Services. Paul is the COO and co-founder of kwiboo (http://www.kwiboo.com/) and is also the creator of GeekZilla.

Comments

Madhu Sudan Mahanta said:

Thanks it's working.

December 18, 2008 - 10:33 AM

Ronald said:

not working..

var reg = new RegExp("^(([0-9])|([0-2][0-9])|([3][0-1]))\/(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\/\d{4}$");

reg.test("01/JAN/2007") will return false!

August 19, 2009 - 5:59 AM

Add Comment

Enter your comment below and it will be submitted for moderation.

Your Name

Add Tag

Please enter tags for this article, seperated by semi-colon ;

View Tag's by : # articles | # views

More Publications

URL Regular Expression
Paul Hayman - 26/07/2006
IP Address regular expression
Paul Hayman - 04/08/2006
IsGuid() (Regular Expression Guid Match)
Paul Hayman - 14/06/2006
ISBN Number regular expression
Paul Hayman - 04/08/2006
Hex code Regular Expression (#F0F0F0)
Paul Hayman - 12/10/2007