Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9778 > unrolled thread

Coloured strings

Started byDavid Bailey <dave@removedbailey.co.uk>
First post2012-04-25 04:33 +0000
Last post2012-04-25 04:33 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Coloured strings David Bailey <dave@removedbailey.co.uk> - 2012-04-25 04:33 +0000

#9778 — Coloured strings

FromDavid Bailey <dave@removedbailey.co.uk>
Date2012-04-25 04:33 +0000
SubjectColoured strings
Message-ID<jn7urg$6be$1@smc.vnet.net>
If you take an expression such as:
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"//FullForm

and colour some portions of the string, you obtain:

\!\(\*
TagBox[
StyleBox["\"\<\\!\\(\\*\\nStyleBox[\\(ABC\\*\\n StyleBox[\\\"DEF\\\",\
\\nFontColor->RGBColor[1, 0, 0]]GHIJKLMN\\*\\n \
StyleBox[\\\"OPQRSTUV\\\",\\nFontColor->RGBColor[0, 0, 1]]WXYZ\\)]\\)\
\>\"",
ShowSpecialCharacters->False,
ShowStringCharacters->True,
NumberMarks->True],
FullForm]\)

I am wondering if anyone knows an easy way to remove the colouring from 
such a string - other than creating a fairly complicated string pattern 
(bearing in mind that the original string might contain unpaired quotes, 
etc!)

David Bailey
http://www.dbaileyconsultancy.co.uk

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web