Linked Questions
11 questions linked to/from Formatting text through pattern matching
45 votes
10 answers
8k views
Programming paradigm change
I'm new to Mathematica, I've been learning by myself, and, being a Java developer for some time, it makes it hard to adapt. I've tried to solve a Reddit challenge, and I came up with this solution: <...
14 votes
7 answers
3k views
Find and highlight sequence patterns in a list
Again, I have a list like this: ...
19 votes
3 answers
1k views
Highlighting pattern strings in a large text
I would like to apply Style to strings that are matched, for example, with one or more specified patterns or regular expressions, a string or a list of both, ...
9 votes
4 answers
785 views
What is shorthand way of Reap list that may be empty because of zero Sow
Sometimes because of conditionals, you cannot guarantee that Sow will be called at least once. Reap[Sow[1]][[2,1]] results in <...
6 votes
2 answers
283 views
Highlighting repeated matches with StringCases
This is a two-part question: First, given txt = "the quick brown fox jumps over the lazy dog" Why does this repeated pattern match both instances: ...
6 votes
3 answers
1k views
Highlighting text with StringReplacePart but also using Style, Subscript
For a Natural Language Processing analysis task it's desirable to highlight a text string programmatically according to XML tags that reference specific words or phrases. The XML tags specify the ...
3 votes
2 answers
992 views
Highlighting or coloring certain words / substrings appearing in a larger string
I have one longer string, longString, and a set $S$ of shorter strings {ss1,ss2,ss3,...}. I'd like to print out ...
2 votes
3 answers
536 views
Plot Epilog FindMaximum
So I have this: a=14; max = FindMaximum[x^3 - a x^2 - x + 1, {x, -2, 15}] (* {1.01781, {x -> -0.0355787}}*) And I plotted this: ...
3 votes
1 answer
375 views
How to create a multicolored string? [duplicate]
I'm interested in displaying a string composed from sub-strings of different colors. Mathematica allows one to create a list comprising sub-strings of different colors, for example ...
2 votes
1 answer
197 views
How to make the StringExpression not occur in my case?
Why is there a StringExpression in the following code? ...
1 vote
2 answers
233 views
Colorize letters in the given string [duplicate]
How can I colorize letters in the given string? For instance: string = "jaonvtaqhsy" How to colorize 3 letters in the middle of ...