content='hello 12345, hello 456321'
pat=re.compile(r'\(???)d+') #要??替換的部分
m=pat.sub("666",content)
print(m)
#hello 666, he( ???)llo 666