So I want to search for a argument a user inputs such as "Hello there" without looking for "Hello" and "There" its self.
String[] words = text.split("\\s+");
for (int i = 0; i < words.length; i++){
if (searchString.contains(words[i])){
counter++;
}
}
Heres the code Im basically trying to count how many times a string appears in txt file.