I've got a strange behaviour with the regex \bC#?\b
string s1 = Regex.Replace("Bla Ca bla", @"\bCa?\b", "[$0]"); // Bla [Ca] bla (as expected)
string s2 = Regex.Replace("Bla C# bla", @"\bC#?\b", "[$0]"); // Bla [C]# bla (why???)
Does anyone understand why it happens and how to match an optional #
at the end?