I am just learning that language and was wondering what a more experience Java programmer would do in the following situation?
I would like to create a java program
Unless the file is very large, I would
String text = IOUtils.toString(new FileReader(filename)); boolean foundWord = text.matches("\\b" + word+ "\\b");
To find all the text between your word you can use split() and use the length of the strings to determine the position.