syntax-check with regular expressions?

Detlef Jockheck spamnews at gmx.de
Tue Jul 27 08:00:44 EDT 2004


Hi,

I would like to check if a string contains a valid date format
(Format: "dd.mm.yyyy") or not.

What is the best way to do this. regexp? At the moment it would be
sufficient to check for
[digit][digit].[digit][digit].[digit][digit][digit][digit] but a full
date verification (Month in range 1-12 ...) would be very nice too.

Sample code would help me very much.

regards
Detlef

PS: I'm a python newbie, so excuse this silly question



More information about the Python-list mailing list