On Monday 05 October 2009, MRAB wrote:
> "(?!.*?(C1).*?\1)" will succeed only if ".*?(C1).*?\1" has failed,
>  in which case the group (group 1) will be undefined (no capture).

I see. 

I should have moved the (C1) out of this expression anyway:

>>> re.match(r'L(?P<tile>..)(?!.*?(?P=tile).*?(?P=tile))(.*?
(?P=tile))','LC1 C1B1B1B1 b3b3b3b3 C2C2C3').groups()
('C1', ' C1')

this solves my problem, thank you!


-- 
Wolfgang
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to