Replacing double quotes with html quote tags for a given string in C# -
By looking at a C # string like this: var str = "in this string" \ "double Quote. ";
I want to change it: var str = "this string is
I have found a solution that strings through strings and does string. & lt; Q & gt; Transfers double quotes with
, followed by I loop and every other & lt; Q & gt;
A termination & lt; / Q>
tag I think there is a better way or more sensible way to do this.
I will use regedx
var str = "this string \ "In \" double \ "aaaaa \" quotes. "; Var str2 = Regex.Replace (str, @ "" "(+.)" "", M = & gt; "& lt; b & gt;" + m.Groups [1]. Value + "& lt; / B & gt; ");
Comments
Post a Comment