Just need a little help on reg expressions, I'm still new to this and I'm totally confused.
I want to validate a date, it has to be in the format MM/DD/YYYY.
This is what I have initially, seems to work fine.
Code: Select all
preg_match("#\d{2}/\d{2}/\d{4}#", '06/25/2005')Code: Select all
preg_match("#\d[1-12]{2}/\d{2}/\d{4}#", '06/25/2005')