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


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

Syntax question

Started byChris Degnen <degnen@cwgsy.net>
First post2011-02-01 11:50 +0000
Last post2011-02-01 11:50 +0000
Articles 1 — 1 participant

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


Contents

  Syntax question Chris Degnen <degnen@cwgsy.net> - 2011-02-01 11:50 +0000

#15964 — Syntax question

FromChris Degnen <degnen@cwgsy.net>
Date2011-02-01 11:50 +0000
SubjectSyntax question
Message-ID<ii8s2m$2ib$1@smc.vnet.net>
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."

[toc] | [standalone]


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


csiph-web