Regular Expressions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
N1gel
Forum Commoner
Posts: 95
Joined: Sun Apr 30, 2006 12:01 pm

Regular Expressions

Post 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
Post Reply