I am trying to figure out how to Replace tags such as ... with the
correct HTML <b>...</b> tags in C#.
The code below works however only if one set of tags are found, if you have
more than two sets of the tags within the text it renders from the first [
and the last ].
Here is the code that doesn't quite work:
////////////////////////////////////////////////////////////////////////////
/////
// replace the bold special tags
text = Regex.Replace(text, "\\[B\\](?<boldText>.*)\\[/B\\]",
"<b>${boldText}</b>", RegexOptions.IgnoreCase);
////////////////////////////////////////////////////////////////////////////
//////
Any ideas on how to find and Replace multiple instances of tags such as
... in a paragraph of text?
Thanks,
d.