Get a specific part of the text in a strict text


Assume that there is a text which like below:

string str = @"stackoverflow(stack:stackoverflow)overstackflow(over:stackoverflow)";

I want to get bold fields. I think I have to find "(" and ":" in text and get the text between of them. Isn't it?

Any advice?

Perhaps with plain string methods:

IList<String> foundStrings = new List<String>();
int currentIndex = 0;
int index = str.IndexOf("(", currentIndex);
while(index != -1)
    int start = index + "(".Length;
    int colonIndex = str.IndexOf(":", start);
    if (colonIndex != -1)
        string nextFound = str.Substring(start, colonIndex - start);
    currentIndex = start;
    index = str.IndexOf("(", currentIndex);