"Tim Chase" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> The below seems to pass all the tests you threw at it (taking the modified 
> 2nd test into consideration)
>
> One other test that occurs to me would be
>
> "xyz123aaabbaaabab"
>
> where you have "aaab" in there twice.

Good suggestion.

> ^([^b]|((?<!a)b))*aaab+[ab]*$

Looks good, although I've been unable to find a good explanation of the 
"negative lookbehind" construct "(?<".  How does it work?

-- 
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