Questions on the manipulation of String objects in Mathematica, and the functions used for these manipulations.

learn more… | top users | synonyms (5)

3
votes
1answer
62 views

How can I lookup the grammatical type of a word?

It seems WordData isn't complete: ...
12
votes
0answers
123 views

Can Mathematica convert a RegularExpression into a StringExpression or vice-versa?

I know that Mathematica can perform string comparison using either StringExpression or RegularExpression. Although regular ...
5
votes
0answers
39 views

The second escaped path breaks command execution

Due to a terrible chain of events I had to reinstall part of my software. Git among it, but a newer version. Something changed because earlier all four evaluations were giving me a version info: <...
5
votes
0answers
58 views

SimilarityRules for SequenceAlignment of two lists

I am trying to use the SimilarityRules option of SequenceAlignment to customize its output. This works perfectly for strings, ...
4
votes
0answers
88 views

Error with String patterns producing Removed[“$$Failure”]

While working on How to capitalize the first letter of each word in a string and trying to understand why certain characters were not considered letters I tried this: ...
3
votes
0answers
24 views

Weird bug with Esc, string, and underscore?

There seems to be a bug with esc key, strings, and underscores. For instance, see the following code: a = f["1_2"]; If an esc character is typed anywhere ...
3
votes
0answers
50 views

Why was StringRepeat designed so that StringRepeat[s, 0] throws an error?

I'm wondering about the rationale behind the design decision that leads to the following expression throwing an error: ...
3
votes
0answers
84 views

Copy string with markup so it looks good on input

How can I copy a string with a bunch of *Box expressions without it blowing up into the raw expression? ...
2
votes
0answers
46 views

Getting “string expected” error when using the TIDES package

TIDES is a package that approximates ODEs using a Taylor series method (You can download it from https://sourceforge.net/projects/tidesodes/ ). First I call the package: ...
2
votes
0answers
103 views

How to efficiently find parts of a string with beginning and ending specified?

I'm trying to find specific URL addresses from a html document. The addresses can be found between the strings "href=\"" and "\" class=\"listing". The problem is not including strings like this: "href=...
2
votes
0answers
131 views

Read in bezier curve from svg file

I am trying to do some calculation of some svg file,After read in with Import["filename","XML"]and some easy operation, I can get the string of the bezier curve, ...
1
vote
0answers
45 views

How to declare variables with plus/minus sign as subscript/superscript?

I am pretty new to mathematica, so please forgive me if I ask any stupid questions. I want to create a vector $a^{+}=[a^+_{k-2},a^+_{k-1},a^+_{k},a^+_{k+1},a^+_{k+2}]$ and then do some symbolic ...
1
vote
0answers
29 views

Non-commutative concatenation of strings, keeping strings separate

I'm using strings as symbolic notation for non-commutative linear algebra and need to be able to concatenate without losing ordering and without combining the strings (in order to apply rules I've ...
1
vote
0answers
75 views

Numbers not treated as numbers

I'm apologize for the stupidity of this question, but I've run out of ideas. I have some data saved in a mx file. When imported, MM isn't treating the values as numbers. For instance: ...
1
vote
0answers
75 views

Using \n (new line) as delimiter in StringSplit

While trying to build my own simple C-language highlighter for strings in Mathematica (see here for a very sophisticated highlighter generator package by Leonid Shifrin) I came upon the issue of using ...
1
vote
0answers
46 views

Where can I find documentation on use of special characters in templates?

I am new to Templates. I have seen the usage "\!\(\*StyleBox ...)" as here: disabling templates What does the string "!(*" accomplish and can I find some ...
1
vote
0answers
88 views

Geodesy without units?

Suppose I'm interested in the latitude of Los Angeles and I do the following: ...
0
votes
0answers
40 views

Generate rule that replaces if string matches pattern

I have let's say a function f[x], but for x I pass a string. And I want to replace that string with a number, if that string ...
0
votes
0answers
20 views

strse error in string operation

When I using jSoupLink, I found strange behaviour First, I load jSoupLink and define linkList ...
0
votes
0answers
45 views

Constant Strings?

I am writing a workbook to compute double integrals, and in order to graph the function in polar/cylindrical form, I have to make a substitution in the original formula. How can I have the original ...
0
votes
0answers
81 views

How to parse fraction to a number?

Considering a fraction: val = "F \!\(\*FractionBox[\(1\), \(1\)]\)"; I extract the part of interest: ...
0
votes
0answers
78 views

Shortest Common Superstring for all k-length strings on an alphabet

Given all strings of length $k$ of an alphabet of size $n$. This gives $n^{k}$ strings. Now I want to create one superstring that contains all these strings as substrings. They hopefully strongly ...
0
votes
0answers
124 views

importing a file with asterisk in its name (Linux machines)

I am trying to import a file: ...
0
votes
0answers
46 views

StringCount in Mathematica

StringCount["one letters three letters letters one letters letters three letters", "one" ~~ __ ~~ "three"] gives 1 because ...