title: Get words around a position in a string
body: <p>I would like to get the words that are around a certain position in a string. For example two words after and two words before.</p>
  
  <p>For example consider the string: </p>
  
  <pre><code>String str = "Hello my name is John and I like to go fishing and hiking I have two sisters and one brother.";
  String find = "I";
  
  for (int index = str.indexOf("I"); index &gt;= 0; index = str.indexOf("I", index + 1))
  {
      System.out.println(index);
  }
  </code></pre>
  
  <p>This writes out the index of where the word "I" is. But I want to be able to get a substring of the words around these positions. </p>
  
  <p>I want to be able to print out "John and I like to" and "and hiking I have two".</p>
  
  <p>Not only single word strings should be able to be selected. Search for "John and" will return " name is John and I like".</p>
  
  <p>Is there any neat, smart way of doing this?</p>