[Python-porting] Pattern help!?

Georg Brandl g.brandl at gmx.net
Thu Nov 18 15:33:17 CET 2010


Am 18.11.2010 15:08, schrieb Fred Drake:
> On Thu, Nov 18, 2010 at 7:48 AM, M.-A. Lemburg <mal at egenix.com> wrote:
>> you can use a negative lookahead:
>>
>> (?!bar\.)foo
> 
> This is normally called a negative lookbehind, though.

Both are slightly wrong: what Marc gave is a lookahead, but
ISTM he *should* have given a lookbehind :)

Georg



More information about the Python-porting mailing list