Hi i have some text which is meant to be displayed within a label.
"Hey @ronald and @tom where are we going this weekend"
What i need to do is change it to this instead
"Hey www.domain.com/ronald and www.domain.com/tom where are we going this weekend"
Now i have this code which someone off stackoverflow has helped me construct, however i am lost on what to do in the next step.
Regex regex = new Regex(@"@[\S]+");
MatchCollection matches = regex.Matches(strStatus);
foreach (Match match in matches)
{
string Username = match.ToString().Replace("@", "");
}
I cannot set the label in the foreach because it would disregard the last word replaced, i hope i am making sense.