[Date Index] [Thread Index] [Author Index]
Re: Syntax question
This is really deep stuff concerned with low level formatting. You can find a reasonable clear tutorial on the tutorial/ StringRepresentationOfBoxes doc page. Cheers -- Sjoerd On Feb 1, 12:50 pm, Chris Degnen <deg... at cwgsy.net> wrote: > Can anyone say what the exclamation mark is doing in the example > below?: > > StringReplace["acgttttccctgagcataaaaacccagcaatacg", > RegularExpression["a..c."] :> > "\!\(\*StyleBox[\"$0\",FontSize->14,FontWeight->\"Bold\"]\)"] > > The example is from An Introduction to Programming with M., page 163. > > The commentary reads: "... we use a regular expression to look for the > pattern consisting of the character "a" repeated one or more times, > followed by the character "c", followed by any character. The > StringReplace function then replaces any expression matching this > pattern with a large, bold formatted expression. The "$0" is used to > refer to the matched pattern."