In a text file i have the following text in one single line
"Past Due 0 to 89 Days Ago 4/7/2007" "Christine Connors" "[email protected]" "Laura Lerner" "[email protected]" "1385 - Workplace Harassment Prevention for Leaders (Online)"
I want to read only the names and the email id ommiting the "Past Due 0 to 89 Days Ago 4/7/2007" part.
Read the complete line in to a string and then spit it using a regular expression.
Assuming <DOUBLE_QUOTE><SPACE><DOUBLE_QUOTE> as the delimiter between two fields, you can use something like this to get the email_id or any other field for that matter.
"Past Due 0 to 89 Days Ago 4/7/2007" "Christine Connors" "[email protected]" "Laura Lerner" "[email protected]" "1385 - Workplace Harassment Prevention for Leaders (Online)"
Can you explain the format in more detail. You can use a stream tokenized to getting token out of fileinputstream and then according to the format in which it has been stored , you can retrieve the name and e-mail id.