Tagged Questions
6
votes
1answer
88 views
How does `LongestCommonSubsequence` work?
When I recently came across this posting about LongestCommonSubsequence I was curious about how the function worked.
...
5
votes
2answers
169 views
Concatenate strings from different levels of list
After a lot of trouble I've finally come pretty close to what I want to do. I now have a list that looks like this:
...
14
votes
6answers
383 views
Splitting a list by specifying section headers
I have a list of strings called mylist:
mylist = {"[a]", "a", "a", "[b]", "b", "b", "[ c ]", "c", "c"};
I would like to split ...
6
votes
3answers
122 views
Importing and manipulating strings - time data
I have a list of time durations, which are strings of the form: "hh:mm:ss". Here's a sample for you to play with:
...
6
votes
3answers
273 views
Specifying string patterns in DeleteCases
It seems that DeleteCases is not compatible with string patterns, at least directly (see, for example, this question). Is this true? If so, why is this the case? ...
3
votes
5answers
221 views
How to extract strings from the list with an additional condition on previous elements?
There are a long list of strings $s$ and two lists of substrings $s1$ and $s2$. I want to take all elements of $s$ which contain a substring from $s2$ and such that before it on no more than $n$ ...
10
votes
7answers
176 views
4
votes
4answers
288 views
Creating lists from a string, separating words from numbers
Say I have a string that contains numbers and words, such as this one:
string = "there are 1234 words and numbers 5678 in here $999";
How would I separate the ...
6
votes
2answers
193 views
How to choose variables from a list for a function and then use the solution in a subsequent function?
I am trying to calculate heating degree days and cooling degree days and output that information to a table. I am using mathematica's curated data to do this. In text this is what I would like to ...
6
votes
3answers
239 views
print the name of the variable in a list without evaluation
a := az + 1
b := bz + 5
list := {a, b}
I'd like mathematica to print
a = az + 1
b = bz + 5
so basically it needs to first ...
11
votes
7answers
355 views
DeleteCases on list of Strings
Consider the following:
data={"AB","CD","AF"};
Now I would like to delete all String from data which starts with "A".
...
4
votes
1answer
176 views
Defining a string based sort function
I'm having a bit of trouble figuring out the right Sort syntax to use on a list of lists. Consider the following list:
...