That Regex seems to work okay for me. I get both matches.
c# Code:
string str = "hi my name is <#name#> and I like <#userLikes#>"; string exp = "<#(.*?)#>"; MatchCollection matches = Regex.Matches(str, exp); foreach (Match m in matches) { MessageBox.Show(m.ToString()); }




Reply With Quote