I am trying to remove all punctuation and special characters from a string, including numbers, but I get an error: error: bad escape \p at position 2
Does this mean that python's regex does not recognize \p{S}
and \p{P}
The code is:
name = "URL-dsds diasa:dksdjsk dskdjs_dskjdks 23232 dsds32 dskdjskds&dsjdsjdhs fddjfd%djshdhjs kdjs¤dskjds öfdfdjfkdj"
re.findall(r'[^\p{P}\p{S}\s\d]+', name.lower())
I expect as output the same as highlighted by regex101: https://regex101.com/r/HJZAUU/1
Any help?