I am trying out the example given in http://docs.python.org/library/re.html for the group numbering and matching. Very simply, (.+) \1 should match two pieces of identical text separated by a space, and it lists the the as an example. However,
re.search('(.+) \1','the the')
returns a None.
I am using re version 2.2.1.
You either need to escape your escapes or use raw strings.
e.g.
or
see the Raw String Notation section on the same page as the example.