6
votes
Accepted
Replace number in string with ? and /;
You've mixed up the usage of PatternTest (?) and Condition (...
4
votes
2
votes
How can I transform the string to a list?
b1 = {a, b, c, d, e};
b2 = {1, 2, 3, 4, 5};
Some more possibilities:
...
2
votes
2
votes
How to remove quotation marks in Table list
list = {{"a,10,20"}, {"b,10,20"}, {"c,10,20"}};
Using ImportString
...
2
votes
Accepted
Why is StringSplit dropping empty entries?
From the documentation:
By default, StringSplit[s,patt] drops zero-length substrings associated with delimiters that appear at the beginning or end of s.
and
StringSplit[s,patt,All] returns all ...
1
vote
Pattern matching with DeleteCases
String matching is different than general pattern matching. Let's look at the full form of the expressions:
...
1
vote
Finding the index of certain strings in a list
p = Position[Last @* StringSplit /@ dates, "23:30:00"]
{{4}, {52}}
Extract[dates, p]
{"2018-01-01 23:30:00"...
1
vote
1
vote
1
vote
How can I transform the string to a list?
b1 = {a, b, c, d, e};
b2 = {1, 2, 3, 4, 5};
Using Thread and MapApply:
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
string-manipulation × 1279list-manipulation × 228
pattern-matching × 172
import × 73
replacement × 59
regular-expressions × 53
text × 47
export × 41
output-formatting × 40
conversion × 37
functions × 31
filtering × 31
function-construction × 29
performance-tuning × 27
programming × 26
files-and-directories × 26
character-encoding × 25
bugs × 23
formatting × 22
data × 20
expression-manipulation × 20
plotting × 19
front-end × 19
date-and-time × 19
number-representation × 19