Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15964 > unrolled thread
| Started by | Chris Degnen <degnen@cwgsy.net> |
|---|---|
| First post | 2011-02-01 11:50 +0000 |
| Last post | 2011-02-01 11:50 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Syntax question Chris Degnen <degnen@cwgsy.net> - 2011-02-01 11:50 +0000
| From | Chris Degnen <degnen@cwgsy.net> |
|---|---|
| Date | 2011-02-01 11:50 +0000 |
| Subject | Syntax 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."
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web