Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting......................Very Urgent

Status
Not open for further replies.

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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top