On Thu, May 8, 2008 10:51, Dick Moores wrote:
> <html>
> <body>
> Could someone tell me what's wrong with this regex?<br><br>

The main thing is that you're forgetting that a RE matches anywhere
in the string.

\b\d+/\d+/\d{2,4}\b matches

4/4/2009
12/12/555

\b\d{1,2}/\d{1,2}\b matches

4/4/2009
4/4/12345
12/12/555
12/12
2/2
2/12



_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to