How can i search the number of same words

Can you tell me how I can see in a textbox or a label the number of words that are the same?

Can you give some examples?

You mean search engine? You type a word and it shows you how many occurrences of that word are in the given text?

For example, in this text there are 6 marked words, tell me there are 6 identical words

Show your blocks that mark the words in this text. Perhaps in these blocks you can add a counter.


It's not easy to do here. You need to split the text on spaces, making a list of all words. Then you have to iterate through the items in the list and compare the value of the items in the list with the search word. If it is the same, increment the counter.

In Label1 is all the text you are searching for.
TextBox1 is the text box of the search engine with the search word.
Label2 displays the number of words found.

You can add these blocks to your button. They are draggable.

If you split the text at ' the ' you get a list with 7 items.

Subtract 1 to get 6.


Good idea and faster. Illustrating the idea of ABG:

1 Like

perfect, thanks ¡¡¡¡¡¡¡

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.