Saturday, 15 March 2014

c# 4.0 - How I can recive colored result from Replace Function? -



c# 4.0 - How I can recive colored result from Replace Function? -

how can recive colored result replace function?

regex.replace("my document", "my", ?);

edited:

i soleved it:

if (richtextbox1.find("ab") > 0) { richtextbox1.selectionbackcolor = color.lightgreen; }

(parts) in strings don't have inherent color. string sequence of characters. terminals utilize "escape characters" interpreted meta-data on how typeset parts of string.

for instance linux shell uses info "\033[31mhello\e[0m world" highlight hello in red. there terminals not recognize such directives.

some command components (i.e. richttextbox) utilize such directives , provide transparent methods insert directives.

c#-4.0

No comments:

Post a Comment