[Solved] c# string manipulation add * for plain word


some how I achieved it in lengthy way …Not sure if any shortcut is there to achieve…

var keywords_updated = (keywords.Replace(” “, “* “));
keywords_updated = keywords_updated.EndsWith(““) ? keywords_updated : keywords_updated + ““;
MatchCollection col = Regex.Matches(keywords, “\\”(.?)\\””);//Regex.Matches(keywords, “(?<=\”)[^\”](?=\”)|[^\” ]+”);
var data = col.Cast().Select(m => m.Value).ToList();

        Console.WriteLine(data.Count);
        foreach (var item in data)
        {
            keywords_updated = keywords_updated.Replace(item.Replace(" ","* "),item);
        }
        keywords_updated = keywords_updated.Replace("\"*", "\" ");
        var spllist = new List<string> { "-", "+", ":" };
        var words = keywords_updated.Split(' ').Where(x=>x.StartsWith("-")||x.StartsWith("+")||x.Contains(":"));
        foreach(var word in words)
        {
            keywords_updated = keywords_updated.Replace(word, word.Replace("*",""));
        }

        Console.WriteLine(keywords_updated);

solved c# string manipulation add * for plain word