I'm trying to remove duplicate lines with this regex that works great:
(.*+)\n*(\1\n+)*
But when I try to use it in Python it doesn't work:
response1 = re.sub(r'(.*+)\n*', r'(\1\n+)*', response1)
Error:
Exception has occurred: re.error
multiple repeat at position 3
Am I doing something wrong?
Thank you,