Read a text file and parse the contents of file
i have to read a text file, which contains information as follows:
CREDIT CARD RECOVERY EXECUTIVE (complaint)
Posted: 2010-12-17 by Adil Basha [send email]
Herrasment from Credit card executives inform u that i used a Credit card since last 2 years, numbered 5176521006890422, due to lost of my job i didnt pay the dues from last 3 months.help.
Credit Card (complaint)
Posted: 2010-12-16 by nileshpundkar [send email]
cheating in settlement Hi,
Last year my shopping amount was 3000 INR plus some previous amount not more than 3000, and including all the charges and late fees the toltal amount goes to 19000.
I want it to be parsed, such that i can get the date, name of the person who sent this message. since there are blank lines in text file i am not knowing how to go about this.
Can anyone tell how to parse this file?
Thanks in advance.
Re: Read a text file and parse the contents of file
I would suggest taking a look at this code - http://www.javaprogrammingforums.com...ner-class.html
Each line will be read in as a String which you can then manipulate and extract data from.