i have a string like this one:
288.999,224.004 283.665,258.338 313.332,293.005 312.332,336.671 270.999,389.338 371.998,412.338
i try to parse the data to float values, but i want to sort it! The value before comma should by my x value and the value after comma should be the y value.
Pattern p = Pattern.compile("[0-9]+.[0-9]*");
Matcher m = p.matcher(pointString);
while(m.find())
{
System.out.print("x:"+m.group(0)); //x- Values
// System.out.print("y:"+m.group(1)); //y- Values
}
This code just creates a single group...How should i change my String pattern to get a second group with the y-Values...
favored result:
x:288.999
y:224.004
x:283.665
y:258.338
....