Basically I'm trying to match a string inside of a string in Java. For example, I'd want to match "hello" in "hello!there!hello!", matching all of the hellos.
I currently have this but it's not working:
if(word.matches(wordToMatch)) {
word = word.replaceAll(wordToMatch, plugin.greenyPhrases.get(wordToMatch));
}
Any help would be majorly appreciated!