John Salerno wrote:
> But would findall return this match: aMNHiRFLoDLFb ??
>
> There are actually two matches there, but they overlap. So how would
> your write an RE that catches them both?
I remembered the 'non-consuming' match (?+...) and a miniute of
experimentation gave
the following.
>>>
John Salerno schreef:
>> pattern = '([a-z][A-Z]{3}[a-z][A-Z]{3}[a-z])+'
>> print re.search(pattern, mess).groups()
>>
>> Anyway, this returns one matching string, but when I put this letter in
>> as the solution to the problem, I get a message saying "yes, but there
>> are more", so assuming this
Justin Azoff wrote:
> John Salerno wrote:
>> Ok, I'm stuck on another Python challenge question. Apparently what you
>> have to do is search through a huge group of characters and find a
>> single lowercase character that has exactly three uppercase characters
>> on either side of it. Here's what I
John Salerno wrote:
> Ok, I'm stuck on another Python challenge question. Apparently what you
> have to do is search through a huge group of characters and find a
> single lowercase character that has exactly three uppercase characters
> on either side of it. Here's what I have so far:
>
> pattern
John Salerno wrote:
> Ok, I'm stuck on another Python challenge question. Apparently what you
> have to do is search through a huge group of characters and find a
> single lowercase character that has exactly three uppercase characters
> on either side of it. Here's what I have so far:
>
> patt