This section provides you an example of with program code which reads the string or text of a text file which is mentioned by the user and replacing all the new line character by the double quote with one space (" ") wherever it found. When the program shows the string as output in the console, you will understand where the new line character was lying because of representing all the double quote with the single space symbol where the new line character was present in the string or text in the file.
Here is the code of the program:
import java.util.regex.*;
|
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Removing Line Termination Characters from a String
Post your Comment