Hi there,
those regular expressions.. trying to get the hang of it.
I want the user to enter date in the format dd/mm/yyyy.
here is the regular expression that I use to match the date with:
$regexp = '/^(0[1-9]|[12][0-9]|3[01])[\/](0[1-9]|1[012])[\/](19|20[0-9]{2})$/';
I sure can't see what the mistake is but preg_match($regexp, $somedate) keeps returning false (although I got 0 once or twice) for any date that's in the format above (dd/mm/yyyy). So, where is the mistake?
Another thing I'd love to know is, as far as i know the forward slash in the end and beginning is a delimiter. Could i use any other character instead the slash?