Try this, it assumes there will always be 1 space contained inside the YN no ("YZ SGYUB").
stringvar str:="SS: 123456789 YN: ABCDEFGHIJKLMNOPQRSTTUVWXYZ SGYUB" & " ";
numbervar ss_s:= instr(str,"SS: ",1) + 4;
numbervar yn_s:= instr(str,"YN: ",1) + 4;
numbervar yn_m:= instr(yn_s,str," ")+1;
numbervar yn_e:= instr(yn_m,str," ");
stringvar SSno:= mid(str,ss_s,9);
Stringvar YNno:= mid(str,yn_s,yn_e-yn_s);
SSno //uncomment to show SS number
//YNno //uncomment to show YN number
edit the str variable to include your field, eg;
stringvar str:= {table.field} & " ";
Regards,
Ryan.
Edited by rkrowland - 19 Jun 2012 at 12:14am