Alex Martelli wrote: > Christoph Conrad <[EMAIL PROTECTED]> wrote: > > >>Hello Roger, >> >> >>>since the length of the first sequence of the letter 'a' is 2. Yours >>>accepts it, right? >> >>Yes, i misunderstood your requirements. So it must be modified >>essentially to that what Tim Chase wrote: >> >> m = re.search('^[^a]*a{3}b', 'xyz123aabbaaab') > > > ...but that rejects 'aazaaab' which should apparently be accepted.
... and that is OK. That was the request: >I'm looking for a regular expression that matches the first, and only > the first, sequence of the letter 'a', and only if the length of the > sequence is exactly 3. --Armin > > > Alex -- http://mail.python.org/mailman/listinfo/python-list