I have a string, which looks like this:
foo
$RESULT :(0.2374742, 0.267722, ...up to a million more)
$STATES :{1, 3, 5, ...}
foo
so somewhere in the string are results and directly after them are the states and I want to save the Results in a list and the states in another list.
I think I need something like “read from $RESULT :(” to “)” get every number and push to list, same for States, but I dont know how to read a String from “a” to “b” and tokenize its content.
1 Answer