Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
1.20/5 (5 votes)
See more:
suppose i have a text file as data.txt has following content such as
12.12.12.12 "www.google.com"|"www.yahoo.com"|"www.rediffmail.com"
13.13.12.12 "www.yahoo.com"|"www.rediffmail.com"|"www.google.com"|"www.google.com"
14.14.12.12 "www.yahoo.com"|"www.rediffmail.com"|"www.yahoo.com"

I have another text file as token.txt has following content such as
"www.google.com" 100
"www.yahoo.com" 200
"www.rediffmail.com" 300

i want to make new file as result.txt that should contain the following data such as
12.12.12.12 100 200 300
13.13.12.12 200 300 100 100
14.14.12.12 200 300 200 

I want code in java language
Posted
Updated 17-Aug-12 9:32am
v4
Comments
[no name] 17-Aug-12 11:39am    
It would appear that you have mistaken CodeProject for a jobs board. Perhaps you meant to go to www.vworker.com?
I.explore.code 17-Aug-12 11:44am    
Chris Maunder should consider renaming "Code Project" to something else I suppose:) Some people seem to be interpreting as "Code for Project work"
[no name] 17-Aug-12 11:46am    
They just don't bother reading the guidelines that are displayed with each and every question.
Albert Holguin 17-Aug-12 15:08pm    
Reading!? ...that's overrated...lol :p
I.explore.code 17-Aug-12 11:40am    
We don't do your homework or projects for you. If you want that service try www.vworker.com. Code Project is where programmers come together to discuss and solve problems not writing code for lazy people.

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
 
Share this answer
 
This is actually trivial to do. You read your files, first building an index of strings to numbers, then parse your other file, and look up numbers from the strings. As others said, we're not here to do your job for you, attempt to do your own work and ask us for specific help, or tell your boss/teacher that programming is not for you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900