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


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

Syntax question

From Chris Degnen <degnen@cwgsy.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Syntax question
Date 2011-02-01 11:50 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <ii8s2m$2ib$1@smc.vnet.net> (permalink)

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web