Page 1 of 1

Regular Expressions

Posted: Wed Sep 02, 2009 4:48 am
by N1gel
Hi

I was wondring if anyone could direct me to some good documentation on Regular Expressions.
(I've tried the PHP manual but I want something more extensive)

I'm currently using ereg but am looking at changing to preg_match as ereg is depricated in 5.3.0

I'm simply trying to check a date matches the correct format using ereg and the expression.

([0-9]{2})/([0-9]{2})/([0-9]{4})

the date should be dd/mm/yyyy however but ereg is accepting dates like 0606/01/07070707 (which is oviously a bogus date i'd like to detect).

Thanks :D