I have a little problem... what's the regular expression for DD/MM/YYYY in PHP? I know that for MM/DD/YYYY is /^\d{1,2}\/\d{1,2}\/\d{4}$/ but for DD/MM/YYYY what is it? I tried to google it but bad luck nothing? Pls help me!!! Thank you!!!
Just in case you are trying to display a date that is already in a database and failed to ask the question correctly, here is page for you to read: http://www.php.net/manual/en/function.date.php
If you wanted a more accurate regex you could use '%^(0[1-9]|1[012])/(0[1-9]|[12][012]|3[01])/\d{4}$%' PHP: It will check that MM is 01 > 12 DD is 01 > 31 and that YYYY is four digits It's not perfect by a long way, but its better than just \d{2} which can have anything from 00 > 99