Depending on your string format, you could maybe use Recode (note that Keep text if no match isn't checked)
or script using For Each Row. If you use For Each Row, you have many different options for parsing the string and how to store your results, below is another example
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(2),
Compress File When Saved(1),
New Column("Column 1",
Character,
"Nominal",
Set Values(
{"Class: 10 Table:15 Stat:NA loc:NA teacher:Sam",
"Class: 11 Table:11 Stat:NA loc:NA teacher:Sam"}
)
)
);
result = {};
For Each Row(dt,
res = Regex(:Column 1, "^(Class: \d+) (.*)?", "\2");
If(!IsMissing(res),
Insert Into(result, res);
);
);
show(result);
// result = {"Table:15 Stat:NA loc:NA teacher:Sam", "Table:11 Stat:NA loc:NA teacher:Sam"};
-Jarmo