import res = 'name&|surna.me|ag,e's = re.sub(r'[^a-zA-Z0-9|]+', '', s)print(s)
Standard input is empty
name|surname|age
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!