Data with Escape Sequences

Hello i had a word file with that contains a text data
**Name : ** Student 1
**Class : ** 4th
Gender : Male

I want to read that data and write it in text file but i want that the data should include escape sequences present in the text

like
Name : Student 1 \n
Class : 4th \n
Gender : Male

“input String”.Replace(System.Environment.NewLine,“\n”)

2 Likes

It’s only replace newline characters, there ae lots of sequences like : \r, \t, \v, etc