If i have a text in a variable, how can i now the number of times a world is mention in that text?
Thanks in advance…
If i have a text in a variable, how can i now the number of times a world is mention in that text?
Thanks in advance…
Try like this:
Count = yourStr.Split("world"c).Length
The above expression will give you no. of times the world word repeated.
Thank you the time, how can i put that in uipath studio? Assign activity?
It doesnt work it throws validation error… weird right? you already tried it and worked?
Just split and count will be definitely the wrong answer… you can follow this instead using an execute code activity
–
Or download CountOcurrences.xaml (5.0 KB) and invoke passing the parameters
Nothing concrete, only there is an error in the form. But dont worry, i could overcome the problem using a foreach and indexof so it finds all the times the word appears… thank you very much though!
Hi,
If you want to do the same without for loop, then check this link