Hello All,
My requirement is to search a word from the sentence.
for example: sentence(single text): "The document is AI contain the data"
search text :"AI"
Output: true
The desired result is:- get that the sentence is having the search text but only if exact word is there no if that alphabet is any word.
For example: "The document contain the data"
search text: "ai".
output: false
regards
sahil
Discussion posts and replies are publicly visible
You can use the substitute method. Use to substitute the desired searchText and then compare the length of the old and new string. If the text was found, then the length of the string will be reduced by searchText characters.