• Post Reply Bookmark Topic Watch Topic
  • New Topic

Code for pulling out specific data from file  RSS feed

 
Zeke Zarlen
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new at Java. I'm trying to find an example of extracting data from a file that has similar characters such as 'abc001' or 'abc00467' or 'abc9999999987' and writing to another file. I want to pull out all the 'abc' entries. The challenge is as you can see part of the data is the same but with variable length. However there is a beginning and ending single quote that I guess could be used. There may be more than one of these entries on a single line or continued to another line.

Regards,
Zeke
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, welcome to the ranch!

What do you have so far? Can you read the file into lines? Find the strings in the line? Decide which strings you want to keep and which to discard? Write them into a new file?

It works well on the ranch to post what you have so far, even if it's not really working, and let us guide you toward the next improvement.
[ June 26, 2005: Message edited by: Stan James ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!