using System;
public class Program
{
const string TAG = "tag";
public static void Main()
var str = "some text with tag";
if( str.Contains(TAG))
str = str.Replace(TAG, string.Empty);
}
log(str);
public static void log(object o) { Console.WriteLine(o == null ? "null" : o.ToString()); }