Below is my unclean text string
text = 'this/r/n/r/nis a non-U.S disclosures/n/n/r/r analysis agreements disclaimer./r/n/n/nPlease keep it confidential'
below is the regexp i'm using:
' '.join(re.findall(r'\b(\w+)\b', text))
my output is:
'this is a non US disclosures analysis agreements disclaimer. Please keep it confidential'
my expected output is:
'this is a non-U.S disclosures analysis agreements disclaimer. Please keep it confidential'
I need to retain special characters and space between the words, there should be exactly one space. can anyone help me to alter my regexp?