On Sun, Jun 06, 2010 at 07:52:43PM +1000, Lie Ryan wrote:
> >>> re.sub('(one) (two)', r'\g<0> - \1 \2',s)
> 
> the \g<number> is equivalent to \number but is intended to ambiguate
> cases like "\g<2>0" vs. "\20". It happens that \g<0> refers to the
> entire group.

Thanks a lot. It works as you say.

With warm regards,
-Payal
-- 

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to