Is there a way to replace all types of the character newline in python by "\n"? The most common newline characters seem to be "\n" and "\r" but in wikepedia you can find different representations. I am looking for something like:
For whitespaces (using re):
txt = re.sub(r'[\s]+',' ',txt)
For hyphens (using regex).. See reference here:
txt = regex.sub(r'\p{Pd}+', '-', txt)