Let’s say that I have string:
-dog--cat--d--
I would like to find all words from that string, and length should be greater than 1.
But what is more, I would like to know first and last index of each of the words.
How could I do that?
I was thinking about creating struct. It could store some data(index start and stop, words, length, etc.)
But I really do not know how to find out any way to get that words.
So far I only created array storing valuese 0 and 1 (if element is ‘-‘ then 0 else 1).
Can anybody help me? 🙂
You can use the regular expression
@"\p{L}{2,}"to find 2 or more consecutive letters: