Whittle it on down

Steven D'Aprano steve at pearwood.info
Thu May 5 11:39:40 EDT 2016


On Thu, 5 May 2016 06:17 pm, Peter Otten wrote:

>> I get something like this:
>> 
>> r"(^[A-Z]+$)|(^([A-Z]+[ ]*\&[ ]*[A-Z]+)+$)"
>> 
>> 
>> but it fails on strings like "AA   &  A &  A". What am I doing wrong?

> test("^A+( *& *A+)*$")

Thanks Peter, that's nice!


-- 
Steven




More information about the Python-list mailing list