OK here's what ive done:
for the text in the listbox item "Factor 1: ABCXXX" where XXX could be 1, 2 or 3 digits long, ive done this code:
var
i: integer;
final: string;
begin
i := pos(': ', listbox1.Items[listbox1.itemindex]);
final := ansimidstr(listbox1.items[listbox1.itemindex], i, length(listbox1.items[listbox1.itemindex]));
showmessage(final);
end;
using the ansimidstr that used to exist in old delphi (which doesnt exist in lazarus).
So...anyone know whats the equivalent in lazarus? ive tried just midstr (as ansileftstr is just leftstr in lazarus, etc.) to no avail...?