I have recently been using regexes in a program. In this program I used them to find words in a list of words that matched a certain RE. However, when i tried backreferencin
The re.findall only returns captured values captured with capturing groups inside the regex pattern.
Use re.finditer that will keep the zeroth group (the whole match):
import re
p = re.compile(r'[abcgr]([a-z])\1[ldc]')
s = "reel reed have that with this they"
print([x.group(0) for x in p.finditer(s)])
See the IDEONE demo