"Alex Martelli" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Tim Chase <[EMAIL PROTECTED]> wrote:
>   ...
>> I'm not quite sure what your intent here is, as the
>> resulting find would obviously be "aaa", of length 3.
>
> But that would also match 'aaaa'; I think he wants negative loobehind
> and lookahead assertions around the 'aaa' part.  But then there's the
> spec about matching only if the sequence is the first occurrence of
> 'a's, so maybe he wants '$[^a]*' instead of the lookbehind (and maybe
> parentheses around the 'aaa' to somehow 'match' is specially?).
>
> It's definitely not very clear what exactly the intent is, no...

Sorry for the confusion.  The correct pattern should reject all strings 
except those in which the first sequence of the letter 'a' that is followed 
by the letter 'b' has a length of exactly three.

Hope that's clearer . . . .

-- 
Roger L. Cauvin
[EMAIL PROTECTED] (omit the "nospam_" part)
Cauvin, Inc.
Product Management / Market Research
http://www.cauvin-inc.com


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to