title: Extract every complete word that contains a certain substring
body: <p>I'm trying to write a function that extracts each word from a sentence that contains a certain substring e.g. Looking for 'Po' in 'Porky Pork Chop' will return Porky Pork.</p>
  
  <p>I've tested my regex on regexpal but the Java code doesn't seem to work. What am I doing wrong?</p>
  
  <pre><code>private static String foo()
      {
  
          String searchTerm = "Pizza";
          String text = "Cheese Pizza";
  
          String sPattern =  "(?i)\b("+searchTerm+"(.+?)?)\b";
          Pattern pattern = Pattern.compile ( sPattern );
          Matcher matcher = pattern.matcher ( text );
          if(matcher.find ())
          {
              String result = "-";
              for(int i=0;i &lt; matcher.groupCount ();i++)
              {
                  result+= matcher.group ( i ) + " ";
              }
              return result.trim ();
          }else
          {
              System.out.println("No  Luck");
          }
      }
  </code></pre>