title: Search multiple words in a text using regular expressions (Java)
body: <p>I have a method to search a word in a text, both inserted by arguments. </p>
  
  <pre><code>public Integer findTheWord(String stringToCheck, String regexString) throws IOException {
  
          int count = 0;
          Pattern regexp = Pattern.compile("\\b" + regexString + "\\b");
          Matcher matcher = regexp.matcher(stringToCheck);
  
          while (matcher.find()) {
                  count++;
                  String matchString = matcher.group();
                  System.out.println(matchString);
              }
          System.out.println(count);
          return count;
    }
  </code></pre>
  
  <p>How can I insert multiple words and return the occurences of each of them?</p>