Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Dylan Bouchard   on Dec 09 In Java Category.

  
Question Answered By: Ziza Mizrachi   on Dec 09

Well, the process I would take is to first read the whole file  into a
bufferedreader. Then go through line by line. On each line, I would use
apache's regexp package and the RE.matchAt method to find words  using regular
expressions (you can match on word boundaries). I'd add each word to an
arraylist. When I finished processing the file, I would write all my words to
the new file and output the size of the arraylist.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Get words from a .txt or .htm file Or get search suggestion and latest updates.


Tagged: