1

I am using EPSONTMT82 printer to print string. in that string i have to make token no as bold. I am added <b> <b/> but it's not printing token no in bold its printing like

Your token no is  <b>C027-</b>
Approximate Wait Time 90.00 Min

i want to print token no like C027

this is my code

if (lst[i].DisplayName.ToLower().Contains("token no"))
{
if (lst[i].DisplayName == lst[i].StaticValue)
strPrint += lst[i].StaticValue + constBold;
else
 strPrint += lst[i].DisplayName + " " + "<b>" + lst[i].StaticValue + "<b/>";
} 

how can i do this any suggestions.

surendra
  • 63
  • 9

1 Answers1

1

https://stackoverflow.com/a/20267631/6034701

Looks like this has been answered here already.

The solution was:

var result = Regex.Replace(
"The allergy type a1c should be written A1C.", // input
@"a1c",                                        // word to match
@"<b>$0</b>",                                  // "wrap match in bold tags"
RegexOptions.IgnoreCase);                      // ignore case when matching
Community
  • 1
  • 1
wilson2610
  • 98
  • 5