Regex validate dates like "Sun, 20 Jun 10"
Posted
by Trindaz
on Stack Overflow
See other posts from Stack Overflow
or by Trindaz
Published on 2010-06-18T05:16:30Z
Indexed on
2010/06/18
5:23 UTC
Read the original article
Hit count: 386
Hi,
I'm working on a regular expression that will only return true when a date string is in a format something like 'ddd, dd mmm yy'.
Valid matches would be values like "Sun, 20 Jun 10" or "Mon, 21 Jun 10" but not "Sunday, 20 Jun 10" or "20 Jun 10".
This will be used with mb_ereg in PHP.
My attempts so far have only got me half way there. Any help appreciated!
Thanks, Dave
© Stack Overflow or respective owner