The task is as follows:
There is an input text, for example: Тест ,слово. Тест.Слово,тест, слово. Тест ,слово. Тест.Слово,тест, слово. .
It is required to find the words inside the text, for example: Тест and mark them with some html tag. At the exit I have to get the text with the words labeled тест case insensitive. The output string should look something like this: <string>Тест</string> ,слово. <string>Тест</string>.Слово,<string>тест</string>, слово. <string>Тест</string> ,слово. <string>Тест</string>.Слово,<string>тест</string>, слово. .
There is an idea to bring the text to lowerCase or upperCase , and search for each word position in the text ( indexOf ) plus the length of the word and wrap these characters in the html tag, but I think this is a crutch option and there is no certainty that it will work.