That's great! That took care of the strings that actually contained the numbers, but I was still getting output that was a single character.
To fix that, I added a length check after the loop finished before printing the variable.
this is what finally worked:
Local StringVar inString := replace(replace(replace({Sheet1_.text},".",""),",","")," ","");
Local NumberVar strLen := Length (inString);
Local NumberVar i := 1;
While i <= strLen Do
(
Local StringVar outString:= mid(inString,i,5);
If NumericText (outString) then exit while;
i := i + 1;
);
if length(outString) = 5 then outString else "";
Thank you for your help! The key learning for me was that Crystal considers the "," and the "." to be numbers.
The trick of getting rid of the spaces in a string was a good tip too.
Thanks!
Ian