I have a large string that has a series of floating points in string. A typical string would have Item X $4.50 Description of item \r\n\r\n Item Z $4.75...
There is really no rhyme or reason for the text. I have the lowest already and I need to find all the values in the string. So if it was 10.00
it would find every value that is 10.05
or less. I would assume that some sort of regex would involved to find the values and then I could put them in an array then sort them.
So it would be something like this to find the which of those values fit my criteria.
int [] array;
int arraysize;
int lowvalue;
int total;
for(int i = 0; i<arraysize; ++i)
{
if(array[i] == lowvalue*1.05) ++total;
}
My problem is getting those values in the array. I have read this but d+ does not really work with floating points.