using System.Text.RegularExpressions;
public static void Main()
string str1 = "<tag tsdfg> some other random text";
string str2 = "<tag sdfgsdfgfsdg> some other random text";
string str3 = "<tag 1564> some other random text";
str1 = Regex.Replace(str1, @"\<tag.*\>", "<tag>");
str2 = Regex.Replace(str2, @"\<tag.*\>", "<tag>");