"Peter Hansen" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Roger L. Cauvin wrote:
>> 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 . . . .
>
> Examples are a *really* good way to clarify ambiguous or complex 
> requirements.  In fact, when made executable they're called "test cases" 
> :-), and supplying a few of those (showing input values and expected 
> output values) would help, not only to clarify your goals for the humans, 
> but also to let the proposed solutions easily be tested.

Good suggestion.  Here are some "test cases":

"xyz123aaabbab" accept
"xyz123aabbaab" reject
"xayz123aaabab" accept
"xaaayz123abab" reject
"xaaayz123aaabab" accept

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