If you want to replace only the first or all words in your String which match a specific character sequence, you could just use String.replaceFirst() or String.replaceAll()

However, if you need to...