Regular expression for mm/dd/yyyy

What regular expression will get month, day year from mm/dd/yyyy?
Who is Participating?

Improve company productivity with a Business Account.Sign Up

AlanJDMConnect With a Mentor Commented:
Why use a regex? Use the date() function...

$date = '08/25/2004';
$month = date('M',strtotime($date));
$day = date('d',strtotime($date));
$year = date('Y',strtotime($date));

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.