Liam Clarke wrote:

> This matches '[A-Z]{3}[a-z]{1}[A-Z]{3}'  477 occurences... so I hope 
> that it's all the same letter.

You have to many occurences because that regex matches XXXxXXX, but also 
XXXXXXxXXXXXX. You should only match exactly 3 guards on each side. IIRC 
I used something like (sadly I threw my code for levels 1 and 2 away):
'[^A-Z][A-Z]{3}[a-z]{1}[A-Z]{3}[^A-Z]'

-- 
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven

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

Reply via email to