On Dec 13, 9:00 pm, Davy <zhushe... at gmail.com> wrote: > > What's "\1" and the whole re.sub() mean? > Read about backreferences here: http://www.regular-expressions.info/brackets.html Also see the entry on parentheses here: http://docs.python.org/lib/re-syntax.html rick