var names = "wwww bs | stk: 15 Cost: 66.1".Split(' '); var stk = names.GetValue(4); var Cost = names.GetValue(6);
Select allOpen in new window
stk:\s*(\d+\.?\d*)\s*cost:\s*(\d+\.?\d*)
why not use split
Open in new window
Regards