You will learn how to separate a string by detecting the line. An example has been given in the section for the best illustration of the procedure of reading of line from the file.
Following program takes a text file name and reads all the string or text from the file. This program also detects the new line character "\n" and shows all the string or text before occurring the new line character.
Here is the code of the program:
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial
Discuss: Reading Lines from a String Using a Regular Expression
Post your Comment