Showing posts with label support all formats of dates. Show all posts
Showing posts with label support all formats of dates. Show all posts

27 September 2011

date regular expressions in .net

@"(([0-9]{1,31})[/|-|(\s)]([0-9]{1,12})[/|-|(\s)](\d{4}|\d{2}))"
//DD/MM/YY(YY)
@"(([0-9]{1,12})[/|-|(\s)]([0-9]{1,31})[/|-|(\s)](\d{4}|\d{2}))"
//MM/DD/YY(YY)
@"((\d{4}|\d{2})[/|-|(\s)]([0-9]{1,31})[/|-|(\s)]([0-9]{1,12}))"
//YY(YY)/DD/MM
@"((\d{4}|\d{2})[/|-|(\s)]([0-9]{1,12})[/|-|(\s)]([0-9]{1,31}))"
//YY(YY)/MM/DD
@"(([0-9]{1,12})[/|-|(\s)](\d{4}|\d{2})[/|-|(\s)]([0-9]{1,31}))"
//MM/YY(YY)/DD
@"(([0-9]{1,31})[/|-|(\s)](\d{4}|\d{2})[/|-|(\s)]([0-9]{1,12}))"
//DD/YY(YY)/MM
@"^(([0-9]{1,2})(\s)?(Jan(uary)?|Feb(ruary)?|(Ma(r(ch)?|y))|Apr(il)?|Ju(n(e)?|l(y)?)|Aug|Oct(ober)?|(Sep(t)?|Nov|Dec)(ember)?)(\s)?(\d{2}|\d{4}))$"
//DD()MMM()YYYY