import re
pattern = """
          \\b(?P<first_part>\\w*(?P<splitter>\\w))   
          (?P<last_part>(?P=splitter)er\\b)        
          """
matcher = re.compile(pattern, re.X)
print(matcher.search('letter').groupdict())
Refer to group inside group with Regex