MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

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> 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."

  • Prev by Date: Re: it isn't strange?!
  • Next by Date: Re: ascii quotes in Program cell
  • Previous by thread: Syntax question
  • Next by thread: Import Converter for Tecplot XY (ascii, point) data