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!

Searching for numbers on a string

Status
Not open for further replies.

rereis

MIS
Jan 17, 2007
19
US
Hi all

Using CR 11, how do I get just the number of a field of type string that looks like:

"Your case number is 2676356 give us a call."

thanks
 
stringvar array x := split({table.string}," ");
numbervar i;
numbervar j := ubound(x);
numbervar y;
for i := 1 to j do(
if isnumeric(x) then
y := val(x)
);
y

This assumes one number per string.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top