Hi,

So... the [^A-Z] limits the [A-Z]{3}?... /me picks at IDLE. Dang, it does.
Thanks a bundle, Roel! And I learn a little more about regexes.... :Z


Cheers,


Liam Clarke


On 5/10/05, Roel Schroeven <[EMAIL PROTECTED]> wrote:
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



--
'There is only one basic human right, and that is to do as you damn well please.
And with it comes the only basic human duty, to take the consequences.'
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to