Hey all,
I needed a little help writing a function in
java that does the follow for espacing, I want to use regular expressions, I need the following characters to be replaced by a “~”
The special characters are replaced as follows:
1. Newline, backspace, Control-M, carriage return, vertical tab characters are each replaced with "~"
2. Double quotes (") are replaced with single quotes (')
3. Then single quotes are escaped by inserting a backslash before each one.
Can someone give me a hand writing this? I don’t know regular expressions so it’s difficult for me to get going on this.