File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to find the occurrences of names in a text document contains a paragraph Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to find the occurrences of names in a text document contains a paragraph" Watch "How to find the occurrences of names in a text document contains a paragraph" New topic
Author

How to find the occurrences of names in a text document contains a paragraph

Nagaraj Shivaklara
Ranch Hand

Joined: Dec 16, 2008
Posts: 77
Hi,

Can you please help me with this?

I have 2 files, 1. Words.txt (Contains some words) 2. Data.txt(Contains a paragraph); I need to find out and display for each word listed in Words.txt appeared in Data.txt.

Can you please help me with the logic??

Thanks
Nagaraj


Thanks n Regards,
Nagaraj S K
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3416
    
  12
Put all the words from data.txt into a Set. Check if each of the words in words.txt is in the Set.


Joanne
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to find the occurrences of names in a text document contains a paragraph
 
Similar Threads
How to display the retrive data in select drop down list.
Problem with file and writing UTF-8 information into file
How to display the retrive data in select drop down list
How to display the retrive data in select drop down list.
Problem with file and writing UTF-8 information into file