May 1, 2002 #1 buh Programmer Apr 3, 2002 27 US Hi all, How can i extract only the numbers from the string. Is there any function? Early reply solicited, Regards, Buh
Hi all, How can i extract only the numbers from the string. Is there any function? Early reply solicited, Regards, Buh
May 1, 2002 #2 Ngolem Programmer Aug 23, 2001 2,724 CA hmmm I suppose the numbers could be sprinkled anywhere, eh! I am going to assume you have CR 8.0 or better Try this formula: WhilePrintingRecords; Stringvar temp := {table.mixedstring}; StringVar result := ""; numbervar icount; for icount := 1 to Length(temp) do ( if isnumeric(temp[icount]) then result := result + temp[icount]; ); result; // or tonumber(result) if you want a real number Hope this helps Jim JimBroadbent@Hotmail.com Upvote 0 Downvote
hmmm I suppose the numbers could be sprinkled anywhere, eh! I am going to assume you have CR 8.0 or better Try this formula: WhilePrintingRecords; Stringvar temp := {table.mixedstring}; StringVar result := ""; numbervar icount; for icount := 1 to Length(temp) do ( if isnumeric(temp[icount]) then result := result + temp[icount]; ); result; // or tonumber(result) if you want a real number Hope this helps Jim JimBroadbent@Hotmail.com